/* Kaede Digital: living manga design system */
:root {
	--ink: #0b0b0b;
	--paper: #f6f4ee;
	--white: #ffffff;
	--gray: #5f5f5f;
	--accent: #d23a1a; /* maple red (Kaede means maple): one spot color for small marks and decoration, never body text */
	--line: 3px;
	--gutter: clamp(10px, 1.3vw, 18px);
	--pad: clamp(16px, 4vw, 56px);
	--max: 1440px;
	--f-display: "Karantina", "Rubik", system-ui, sans-serif;
	--f-serif: "Frank Ruhl Libre", Georgia, serif;
	--f-body: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
	--f-mono: "IBM Plex Mono", "Rubik", ui-monospace, monospace;
	--f-jp: "Dela Gothic One", "Hiragino Sans", "Rubik", sans-serif;
	--ease: cubic-bezier(.7, 0, .2, 1);
	--spring: cubic-bezier(.34, 1.56, .64, 1);
	--sfx: var(--f-jp);
}

.kd-sfx-bubbles { --sfx: "Rubik Bubbles", var(--f-jp); }
.kd-sfx-maze { --sfx: "Rubik Maze", var(--f-jp); }
.kd-sfx-iso { --sfx: "Rubik Iso", var(--f-jp); }
.kd-sfx-glitch { --sfx: "Rubik Glitch", var(--f-jp); }
.kd-sfx-doodle { --sfx: "Rubik Doodle Shadow", var(--f-jp); }
.kd-sfx-puddles { --sfx: "Rubik Puddles", var(--f-jp); }
.kd-sfx-spray { --sfx: "Rubik Spray Paint", var(--f-jp); }
.kd-sfx-fax { --sfx: "Rubik Broken Fax", var(--f-jp); }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
:where(body.kd) img { height: auto; }
:where(body.kd) button { font: inherit; }
:where(body.kd) :is(h1, h2, h3, h4) { line-height: 1.1; }
body.kd {
	margin: 0;
	background-color: var(--paper);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	color: var(--ink);
	font-family: var(--f-body);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}
body.kd ::selection { background: var(--accent); color: var(--white); }
body.kd :focus-visible { outline: 3px dashed currentColor; outline-offset: 4px; }
:where(body.kd) a { color: inherit; }
:where(body.kd) img { max-width: 100%; }
:where(body.kd) :is(h1, h2, h3, h4) { color: var(--ink); }
.kd-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kd-skip { position: fixed; top: -60px; inset-inline-start: 12px; z-index: 200; background: var(--ink); color: var(--white) !important; padding: 10px 16px; font-weight: 700; }
.kd-skip:focus { top: 12px; }
.kd-jp { font-family: var(--f-jp); }
.kd-linkbtn { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

/* Elementor wrappers around Kaede widgets get out of the way */
body.kd .e-con:has(> [class*="elementor-widget-kaede_"]),
body.kd .e-con:has(> .e-con-inner > [class*="elementor-widget-kaede_"]) {
	--padding-top: 0px; --padding-bottom: 0px; --padding-left: 0px; --padding-right: 0px;
	--gap: 0px; --row-gap: 0px; --column-gap: 0px; --content-width: 100%; --width: 100%;
	padding: 0 !important; max-width: none;
}
body.kd .e-con > [class*="elementor-widget-kaede_"],
body.kd .e-con-inner > [class*="elementor-widget-kaede_"] { width: 100%; margin: 0 !important; }
body.kd .elementor-widget-container { margin: 0; }

/* ---------- shared manga primitives ---------- */
.kd-kicker {
	display: inline-flex; align-items: center; gap: 10px; margin: 0;
	font-family: var(--f-mono); font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
}
.kd-kicker::before { content: ""; width: 10px; height: 10px; background: var(--accent); transform: rotate(45deg); flex: none; }
html[lang^="he"] .kd-kicker { letter-spacing: .04em; font-size: 14px; }

.kd-h2 { font-family: var(--f-display); font-weight: 700; font-size: clamp(44px, 6vw, 96px); line-height: .9; margin: 0 0 24px; letter-spacing: -.01em; }
.kd-tone { background-image: radial-gradient(var(--ink) 1.05px, transparent 1.35px); background-size: 7px 7px; }
.kd-speedlines {
	background:
		repeating-conic-gradient(from 3deg at var(--sx, 50%) var(--sy, 50%), var(--ink) 0deg .55deg, transparent .55deg 2.9deg),
		repeating-conic-gradient(from 0deg at var(--sx, 50%) var(--sy, 50%), var(--ink) 0deg .25deg, transparent .25deg 1.7deg);
	-webkit-mask: radial-gradient(circle at var(--sx, 50%) var(--sy, 50%), transparent 0 var(--sr, 26%), #000 calc(var(--sr, 26%) + 32%));
	mask: radial-gradient(circle at var(--sx, 50%) var(--sy, 50%), transparent 0 var(--sr, 26%), #000 calc(var(--sr, 26%) + 32%));
}

.kd-btns { display: flex; flex-wrap: wrap; gap: 14px; }
.kd-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 54px; padding: 0 26px; border: var(--line) solid var(--ink); border-radius: 0;
	background: var(--white); color: var(--ink) !important; text-decoration: none !important;
	font: 700 17px/1.1 var(--f-body); cursor: pointer; box-shadow: 5px 5px 0 var(--ink);
	transition: transform .15s ease, box-shadow .15s ease, background .2s;
}
.kd-btn:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); background: var(--white); }
.kd-btn:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--ink); }
.kd-btn--ink { background: var(--ink); color: var(--white) !important; box-shadow: 5px 5px 0 var(--paper), 8px 8px 0 var(--accent); }
.kd-btn--ink:hover { background: var(--ink); box-shadow: 7px 7px 0 var(--paper), 11px 11px 0 var(--accent); }
.kd-btn svg { width: 20px; height: 20px; }

.kd-bubble {
	position: relative; background: var(--white); border: var(--line) solid var(--ink);
	border-radius: 30px; padding: 18px 24px; filter: drop-shadow(5px 5px 0 var(--ink));
}
.kd-bubble::before, .kd-bubble::after { content: ""; position: absolute; inset-inline-start: 46px; }
.kd-bubble::before { bottom: -27px; width: 36px; height: 29px; background: var(--ink); clip-path: polygon(0 0, 100% 0, 8% 100%); }
.kd-bubble::after { bottom: -20px; inset-inline-start: 50px; width: 26px; height: 24px; background: var(--white); clip-path: polygon(0 0, 100% 0, 8% 100%); }

.kd-chip {
	display: inline-flex; align-items: center; padding: 6px 14px; border: 2px solid var(--ink); border-radius: 999px;
	background: var(--white); font-size: 14px; font-weight: 700; text-decoration: none; color: var(--ink);
}

.kd-js [data-kd-reveal]:not(.is-in) { clip-path: inset(0 0 100% 0); }
.kd-js [data-kd-reveal] { transition: clip-path 1.1s var(--ease); }
.kd-js [data-kd-reveal].is-in { clip-path: inset(-20% -20% -20% -20%); }

/* ---------- header ---------- */
.kd-top {
	position: sticky; top: 0; z-index: 100; background: var(--paper);
	border-bottom: var(--line) solid var(--ink); view-transition-name: kd-top;
}
body.admin-bar .kd-top { top: 32px; }
.kd-top-in {
	max-width: var(--max); margin: 0 auto; height: 78px; padding: 0 var(--pad);
	display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
}
.kd-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.kd-brand-face {
	width: 50px; height: 50px; border-radius: 50%; border: var(--line) solid var(--ink); overflow: hidden;
	background: var(--white); display: grid; place-items: center; transition: transform .5s var(--spring);
}
.kd-brand-face img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); }
.kd-brand:hover .kd-brand-face { transform: rotate(-14deg) scale(1.08); }
.kd-brand-word { font-family: var(--f-jp); font-size: 23px; letter-spacing: .08em; line-height: .9; display: flex; flex-direction: column; direction: ltr; }
.kd-brand-word small { font-family: var(--f-mono); font-size: 9px; font-weight: 600; letter-spacing: .5em; margin-top: 4px; }
.kd-hanko {
	display: inline-grid; place-items: center; width: 28px; height: 28px; background: var(--ink); color: var(--paper);
	font-family: var(--f-jp); font-size: 17px; line-height: 1; border-radius: 4px; transform: rotate(-8deg);
	box-shadow: inset 0 0 0 2px var(--paper), 0 0 0 1.5px var(--ink);
}
.kd-nav { justify-self: center; display: flex; gap: clamp(14px, 2.4vw, 38px); }
.kd-nav a { position: relative; padding: 8px 0; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 16px; }
.kd-nav a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--accent);
	transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
html[dir="rtl"] .kd-nav a::after { transform-origin: right; }
.kd-nav a:hover::after, .kd-nav a[aria-current="page"]::after { transform: scaleX(1); }
.kd-top-act { display: flex; align-items: center; gap: 10px; }
.kd-lang {
	width: 46px; height: 46px; border-radius: 50%; border: var(--line) solid var(--ink); background: var(--white);
	display: grid; place-items: center; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14px;
	transition: transform .4s var(--spring), background .2s, color .2s;
}
.kd-lang:hover { background: var(--ink); color: var(--white); transform: rotate(-20deg) scale(1.08); }
.kd-talk {
	position: relative; border: var(--line) solid var(--ink); background: var(--white); color: var(--ink);
	border-radius: 999px; padding: 10px 20px; font: 700 15px/1 var(--f-body); cursor: pointer;
	box-shadow: 4px 4px 0 var(--ink); transition: transform .15s, box-shadow .15s;
}
.kd-talk::after {
	content: ""; position: absolute; bottom: -12px; inset-inline-end: 22px; width: 14px; height: 12px;
	background: var(--ink); clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.kd-talk:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.kd-burger {
	width: 50px; height: 50px; border: var(--line) solid var(--ink); background: var(--ink); color: var(--white);
	display: grid; place-items: center; cursor: pointer; padding: 0;
}
.kd-burger-lines, .kd-burger-lines::before, .kd-burger-lines::after {
	display: block; width: 22px; height: 3px; background: currentColor; transition: transform .35s var(--ease), opacity .2s;
}
.kd-burger-lines { position: relative; }
.kd-burger-lines::before, .kd-burger-lines::after { content: ""; position: absolute; left: 0; }
.kd-burger-lines::before { top: -7px; }
.kd-burger-lines::after { top: 7px; }
.kd-burger[aria-expanded="true"] .kd-burger-lines { background: transparent; }
.kd-burger[aria-expanded="true"] .kd-burger-lines::before { transform: translateY(7px) rotate(45deg); }
.kd-burger[aria-expanded="true"] .kd-burger-lines::after { transform: translateY(-7px) rotate(-45deg); }
.kd-top.is-scrolled { box-shadow: 0 6px 0 rgba(11, 11, 11, .06); }

/* ---------- full screen manga menu ---------- */
.kd-menu {
	position: fixed; inset: 81px 0 0; z-index: 99; background: var(--paper); overflow: auto;
	clip-path: circle(0 at var(--mx, 95%) 0); transition: clip-path .7s var(--ease);
}
body.admin-bar .kd-menu { top: 113px; }
.kd-menu.is-open { clip-path: circle(150% at var(--mx, 95%) 0); }
.kd-menu[hidden] { display: block; visibility: hidden; }
.kd-menu.is-open[hidden], .kd-menu.is-open { visibility: visible; }
.kd-menu-in { display: grid; grid-template-columns: 2.1fr 1fr; gap: var(--gutter); padding: var(--gutter); min-height: 100%; box-sizing: border-box; }
.kd-menu-services { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(150px, 1fr); gap: var(--gutter); }
.kd-mp {
	position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
	padding: 14px; border: var(--line) solid var(--ink); background: var(--white); color: var(--ink); text-decoration: none;
	transition: transform .25s var(--spring), box-shadow .25s;
}
.kd-mp--hero { grid-column: span 2; }
.kd-mp img { position: absolute; bottom: 0; inset-inline-end: 0; height: 92%; width: auto; transition: transform .5s var(--spring); }
.kd-mp-sfx { position: absolute; top: 10px; inset-inline-start: 14px; font-family: var(--sfx); font-size: clamp(28px, 3vw, 54px); line-height: 1; transform: rotate(-9deg); }
.kd-mp b { position: relative; align-self: flex-start; background: var(--ink); color: var(--white); padding: 5px 12px; font-size: 17px; }
.kd-mp:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--ink); }
.kd-mp:hover img { transform: scale(1.07) rotate(-3deg); }
.kd-menu-side { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: 18px; border: var(--line) solid var(--ink); background: var(--ink); color: var(--paper); }
.kd-menu-side nav a {
	display: block; font-family: var(--f-display); font-weight: 700; font-size: clamp(48px, 6vw, 96px); line-height: .92;
	color: var(--paper); text-decoration: none; transition: color .2s, -webkit-text-stroke .2s;
}
.kd-menu-side nav a:hover { color: transparent; -webkit-text-stroke: 2px var(--paper); }
.kd-menu-mail { color: var(--paper) !important; font-family: var(--f-mono); }
.kd-menu-contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.kd-menu-social { display: flex; gap: 10px; }
.kd-soc svg { width: 18px; height: 18px; flex: none; }
.kd-menu-social .kd-soc { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 2px solid var(--paper); border-radius: 50%; color: var(--paper) !important; transition: background .2s, color .2s; }
.kd-menu-social .kd-soc svg { width: 20px; height: 20px; }
.kd-menu-social .kd-soc:hover, .kd-menu-social .kd-soc:focus-visible { background: var(--accent); border-color: var(--accent); }
.kd-foot-grid .kd-soc { display: inline-flex; align-items: center; gap: 8px; }
body.kd-menu-open { overflow: hidden; }

/* ---------- clocks (menu + footer) ---------- */
.kd-clock { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed currentColor; }
.kd-clock b { flex: 1; font-weight: 500; }
.kd-clock time { font-family: var(--f-mono); font-size: 18px; direction: ltr; }
.kd-clock i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; }
.kd-clock.is-on i { background: currentColor; animation: kd-ping 2s infinite; }

/* ---------- footer ---------- */
.kd-foot { background: var(--ink); color: var(--paper); margin-top: 0; }
.kd-foot a { color: var(--paper); text-decoration: none; }
.kd-foot a:hover { text-decoration: underline; text-underline-offset: 5px; }
.kd-foot-cta {
	position: relative; display: grid; grid-template-columns: minmax(200px, 420px) 1fr; align-items: end; gap: 24px;
	padding: 90px var(--pad) 0; background: var(--paper); color: var(--ink); border-top: var(--line) solid var(--ink); overflow: hidden;
}
.kd-foot-cta::before { content: ""; position: absolute; inset: 0; --sx: 20%; --sy: 70%; --sr: 18%; opacity: .9; }
.kd-foot-cta::before {
	background:
		repeating-conic-gradient(from 3deg at var(--sx) var(--sy), var(--ink) 0deg .55deg, transparent .55deg 2.9deg);
	-webkit-mask: radial-gradient(circle at var(--sx) var(--sy), transparent 0 18%, #000 60%);
	mask: radial-gradient(circle at var(--sx) var(--sy), transparent 0 18%, #000 60%);
}
html[dir="rtl"] .kd-foot-cta::before { --sx: 80%; }
.kd-foot-kaede { position: relative; display: block; width: 100%; max-height: 460px; object-fit: contain; object-position: bottom; }
.kd-foot-bubble { position: relative; margin-bottom: 80px; max-width: 760px; background: var(--white); border: var(--line) solid var(--ink); border-radius: 40px; padding: 34px 38px; filter: drop-shadow(8px 8px 0 var(--ink)); }
.kd-foot-bubble h2 { font-family: var(--f-display); font-weight: 700; font-size: clamp(42px, 5.4vw, 86px); line-height: .92; margin: 14px 0 26px; }
.kd-foot-bubble .kd-btn--ink { box-shadow: 5px 5px 0 var(--white), 8px 8px 0 var(--accent); }
.kd-foot-grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr) 1.2fr; gap: 40px; padding: 72px var(--pad) 40px; }
.kd-foot-grid h3 { color: var(--paper) !important; font-family: var(--f-mono); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 16px; opacity: .7; }
.kd-foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.kd-foot-giant {
	display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 0 var(--pad); overflow: hidden;
	font-family: var(--f-jp); font-size: clamp(90px, 21vw, 380px); line-height: .78; color: transparent; -webkit-text-stroke: 2px var(--paper);
	user-select: none; direction: ltr;
}
.kd-foot-kanji { color: var(--paper); -webkit-text-stroke: 0; }
.kd-foot-legal { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px 26px; padding: 22px var(--pad) 30px; border-top: 1px solid rgba(246, 244, 238, .2); font-size: 14px; opacity: .8; }

/* ---------- accessibility + cookies dock (left), Kaede chat (right) ---------- */
.kd-float { position: fixed; bottom: 18px; inset-inline-end: 18px; z-index: 120; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: none; }
.kd-float > * { pointer-events: auto; }
.kd-dock { display: flex; flex-direction: column; gap: 10px; margin-inline-end: 6px; }
.kd-dock[hidden], .kd-dock-btn[hidden] { display: none; }
.kd-dock-btn .kd-i-play, .kd-dock-btn[aria-pressed="true"] .kd-i-pause { display: none; }
.kd-dock-btn[aria-pressed="true"] .kd-i-play { display: block; }
.kd-dock-btn {
	position: relative; width: 54px; height: 54px; border-radius: 50%; border: var(--line) solid var(--ink); background: var(--white); color: var(--ink);
	display: grid; place-items: center; padding: 0; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); transition: transform .2s var(--spring), box-shadow .2s, background .2s, color .2s;
}
.kd-dock-btn svg { width: 26px; height: 26px; }
.kd-dock-btn span {
	position: absolute; inset-inline-end: calc(100% + 12px); top: 50%; transform: translateY(-50%) scale(.9); white-space: nowrap;
	background: var(--ink); color: var(--paper); font: 700 13px/1 var(--f-body); padding: 8px 12px; border-radius: 99px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--spring);
}
.kd-dock-btn:hover, .kd-dock-btn:focus-visible { background: var(--ink); color: var(--white); transform: translate(-2px, -2px) rotate(-8deg); box-shadow: 6px 6px 0 var(--ink); }
.kd-dock-btn:hover span, .kd-dock-btn:focus-visible span { opacity: 1; transform: translateY(-50%) scale(1); }
/* Japanese sound effects read left to right inside, but keep the page direction for their position */
.kd-jp { unicode-bidi: plaintext; }
html[lang^="he"] .kd-kicker { font-family: var(--f-body); }

.kd-fab {
	position: relative; display: flex; align-items: center; gap: 10px;
	padding: 5px; padding-inline-end: 18px; border: var(--line) solid var(--ink); border-radius: 999px; background: var(--white);
	color: var(--ink); font: 700 15px/1 var(--f-body); cursor: pointer; box-shadow: 5px 5px 0 var(--ink);
	view-transition-name: kd-fab; animation: kd-bob 6s ease-in-out infinite;
}
.kd-fab img { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; background: var(--white); }
.kd-fab:hover { animation: none; transform: translate(-2px, -2px) rotate(-2deg); box-shadow: 8px 8px 0 var(--ink); }
.kd-fab[aria-expanded="true"] { opacity: 0; pointer-events: none; }
.kd-chat {
	position: fixed; bottom: 18px; inset-inline-end: 96px; z-index: 121; width: min(410px, calc(100vw - 120px));
	height: min(640px, calc(100svh - 110px)); display: flex; flex-direction: column; background: var(--paper);
	border: var(--line) solid var(--ink); border-radius: 24px; box-shadow: 9px 9px 0 var(--ink); overflow: hidden;
	transform-origin: bottom left; animation: kd-pop .45s var(--spring);
}
.kd-chat[hidden] { display: none; }
.kd-chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--ink); color: var(--paper); }
.kd-chat-head img { width: 46px; height: 46px; border-radius: 50%; background: var(--white); border: 2px solid var(--paper); object-fit: cover; }
.kd-chat-head div { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.kd-chat-head b { font-family: var(--f-display); font-size: 30px; line-height: .9; letter-spacing: .02em; color: var(--paper); }
.kd-chat-head small { font-size: 12px; opacity: .8; }
.kd-chat-x { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--paper); background: transparent; color: var(--paper); font-size: 24px; line-height: 1; cursor: pointer; }
.kd-chat-log {
	flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px;
	background-image: radial-gradient(rgba(11, 11, 11, .12) 1px, transparent 1.3px); background-size: 8px 8px;
}
.kd-msg { max-width: 85%; padding: 11px 15px; font-size: 15.5px; line-height: 1.5; border: 2px solid var(--ink); border-radius: 18px; white-space: pre-wrap; word-break: break-word; animation: kd-pop .3s var(--spring); }
.kd-msg--k { align-self: flex-start; background: var(--white); border-end-start-radius: 4px; box-shadow: 3px 3px 0 var(--ink); }
.kd-msg--u { align-self: flex-end; background: var(--ink); color: var(--paper); border-end-end-radius: 4px; }
.kd-typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.kd-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); animation: kd-blink 1s infinite; }
.kd-typing i:nth-child(2) { animation-delay: .15s; }
.kd-typing i:nth-child(3) { animation-delay: .3s; }
.kd-chat-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 10px; }
.kd-chat-chips button { border: 2px solid var(--ink); background: var(--white); color: var(--ink); border-radius: 999px; padding: 7px 13px; font: 500 14px/1.2 var(--f-body); cursor: pointer; }
.kd-chat-chips button:hover { background: var(--ink); color: var(--white); }
.kd-chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: var(--line) solid var(--ink); background: var(--white); }
.kd-chat-form textarea {
	flex: 1; resize: none; max-height: 140px; border: 0; outline: 0; background: transparent; color: var(--ink);
	font: 16px/1.45 var(--f-body); padding: 9px 4px;
}
.kd-chat-form button { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ink); color: var(--white); display: grid; place-items: center; cursor: pointer; flex: none; }
html[dir="rtl"] .kd-chat-form button svg { transform: scaleX(-1); }
.kd-chat-note { margin: 0; padding: 6px 14px 10px; background: var(--white); font-size: 11.5px; color: var(--gray); }

/* ---------- articles ---------- */
.kd-ahero {
	position: relative; overflow: hidden; display: grid; align-items: end; min-height: min(72vh, 660px);
	padding: clamp(48px, 8vw, 110px) var(--pad) 56px; border-bottom: var(--line) solid var(--ink); background: var(--paper);
}
.kd-ahero-speed {
	position: absolute; inset: 0; --sx: 82%; --sy: 62%; --sr: 16%; opacity: .95;
	background:
		repeating-conic-gradient(from 3deg at var(--sx) var(--sy), var(--ink) 0deg .55deg, transparent .55deg 2.9deg),
		repeating-conic-gradient(from 0deg at var(--sx) var(--sy), var(--ink) 0deg .22deg, transparent .22deg 1.6deg);
	-webkit-mask: radial-gradient(circle at var(--sx) var(--sy), transparent 0 16%, #000 54%), linear-gradient(to var(--fade-dir, left), #000 40%, transparent 85%);
	-webkit-mask-composite: source-in; mask-composite: intersect;
	mask: radial-gradient(circle at var(--sx) var(--sy), transparent 0 16%, #000 54%), linear-gradient(to var(--fade-dir, left), #000 40%, transparent 85%);
}
html[dir="rtl"] .kd-ahero-speed { --sx: 18%; --fade-dir: right; }
.kd-ahero { isolation: isolate; }
.kd-ahero-in { position: relative; z-index: 2; max-width: min(860px, 62%); }
.kd-ahero-in::before { content: ""; position: absolute; inset: -50px -60px -30px; z-index: -1; background: radial-gradient(closest-side, var(--paper) 72%, transparent); }
.kd-ahero-title { font-family: var(--f-display) !important; font-weight: 700; font-size: clamp(50px, 7.6vw, 128px); line-height: .9; margin: 18px 0 18px; letter-spacing: -.005em; }
.kd-ahero-sub { font-size: clamp(18px, 1.6vw, 22px); max-width: 40em; margin: 0 0 22px; }
.kd-ahero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; font-family: var(--f-mono); font-size: 14px; }
.kd-ahero-meta span + span::before { content: "✦"; margin-inline-end: 22px; }
.kd-ahero-kaede { position: absolute; z-index: 1; bottom: 0; inset-inline-end: var(--pad); height: min(60vh, 540px); width: auto; max-width: 38%; object-fit: contain; object-position: bottom; }
.kd-ahero-sfx {
	position: absolute; z-index: 2; top: 14%; inset-inline-end: calc(var(--pad) + min(30vw, 380px));
	font-family: var(--sfx); font-size: clamp(54px, 8vw, 140px); line-height: 1; color: var(--accent);
	-webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 6px 6px 0 var(--ink); transform: rotate(-10deg);
}
.kd-crumbs { display: flex; gap: 10px; font-size: 14px; margin-bottom: 14px; }
.kd-crumbs a { text-decoration: none; border-bottom: 2px solid var(--ink); }
.kd-article-grid { max-width: 1240px; margin: 0 auto; padding: 64px var(--pad) 40px; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); }
.kd-article-side { position: relative; }
.kd-article-side > * { position: sticky; top: 110px; }
.kd-toc { border: var(--line) solid var(--ink); background: var(--white); padding: 18px 20px; box-shadow: 5px 5px 0 var(--ink); }
.kd-toc ol { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: toc; display: grid; gap: 10px; }
.kd-toc li { counter-increment: toc; display: grid; grid-template-columns: 28px 1fr; font-size: 15px; line-height: 1.35; }
.kd-toc li::before { content: counter(toc, decimal-leading-zero); font-family: var(--f-mono); font-size: 12px; padding-top: 2px; }
.kd-toc a { text-decoration: none; }
.kd-toc a:hover { text-decoration: underline; }
.kd-tip { position: static !important; margin-top: 28px; display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: start; }
.kd-tip img { width: 56px; height: 56px; border-radius: 50%; border: var(--line) solid var(--ink); background: var(--white); object-fit: cover; }
.kd-tip p { margin: 0; background: var(--white); border: var(--line) solid var(--ink); border-radius: 18px; border-start-start-radius: 4px; padding: 12px 14px; font-size: 15px; box-shadow: 4px 4px 0 var(--ink); }
.kd-tip b { display: block; font-family: var(--f-display); font-size: 26px; line-height: 1; margin-bottom: 4px; }

.kd-prose { font-size: 19px; line-height: 1.8; max-width: 740px; }
.kd-prose > *:first-child { margin-top: 0; }
.kd-prose h2 {
	font-family: var(--f-display) !important; font-weight: 700; font-size: clamp(38px, 4.2vw, 60px); line-height: .95;
	margin: 64px 0 18px; padding-bottom: 10px; background: linear-gradient(var(--ink), var(--ink)) bottom / 72px 5px no-repeat;
}
html[dir="rtl"] .kd-prose h2 { background-position: bottom right; }
.kd-prose h3 { font-family: var(--f-body); font-weight: 700; font-size: 23px; line-height: 1.3; margin: 40px 0 10px; }
.kd-prose p { margin: 0 0 20px; }
.kd-prose a { font-weight: 500; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--accent); }
.kd-prose strong { background: linear-gradient(transparent 62%, rgba(11, 11, 11, .14) 62%); }
.kd-prose ul, .kd-prose ol { margin: 0 0 24px; padding-inline-start: 26px; }
.kd-prose li { margin-bottom: 8px; }
.kd-prose ul li::marker { content: "■  "; font-size: .7em; }
.kd-prose blockquote { margin: 32px 0; padding: 22px 26px; border: var(--line) solid var(--ink); border-radius: 26px; background: var(--white); font-family: var(--f-serif); font-size: 23px; box-shadow: 6px 6px 0 var(--ink); }
.kd-prose table { width: 100%; border-collapse: collapse; margin: 28px 0; font-size: 16px; background: var(--white); }
.kd-prose th, .kd-prose td { border: 2px solid var(--ink); padding: 10px 12px; text-align: start; vertical-align: top; }
.kd-prose th { background: var(--ink); color: var(--paper); }
.kd-prose .kd-table { overflow-x: auto; }
.kd-prose hr { border: 0; height: 3px; background: var(--ink); margin: 40px 0; }

.kd-article-cta { max-width: 1240px; margin: 20px auto 0; padding: 40px var(--pad); text-align: center; }
.kd-article-cta h2 { font-family: var(--f-display); font-size: clamp(42px, 5vw, 80px); line-height: .9; margin: 14px 0 22px; }
.kd-article-cta .kd-btns { justify-content: center; }
.kd-related { max-width: var(--max); margin: 0 auto; padding: 60px var(--pad) 90px; }

.kd-agrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(var(--gutter) * 1.6); }
.kd-agrid--hub { max-width: var(--max); margin: 0 auto; padding: 56px var(--pad) 90px; }
.kd-agrid-cell { display: contents; }
.kd-agrid-cell[hidden] { display: none; }
.kd-acard a {
	display: flex; flex-direction: column; height: 100%; border: var(--line) solid var(--ink); background: var(--white);
	color: var(--ink); text-decoration: none; transition: transform .2s var(--spring), box-shadow .2s;
}
.kd-acard a:hover { transform: translate(-4px, -4px); box-shadow: 9px 9px 0 var(--ink); }
.kd-acard-art { position: relative; aspect-ratio: 16 / 10; border-bottom: var(--line) solid var(--ink); overflow: hidden; display: grid; place-items: end center; background-image: radial-gradient(var(--ink) 1px, transparent 1.3px); background-size: 7px 7px; background-color: var(--paper); }
/* Kaede is pinned inside the frame and scaled to fit, so no pose is ever cropped. */
.kd-acard-art img { position: absolute; left: 4%; bottom: 0; width: 92%; height: 94%; object-fit: contain; object-position: 50% 100%; transition: transform .5s var(--spring); }
.kd-acard a:hover .kd-acard-art img { transform: scale(1.06) rotate(-2deg); }
.kd-acard-sfx { position: absolute; top: 12px; inset-inline-start: 14px; font-family: var(--sfx); font-size: clamp(30px, 3vw, 46px); line-height: 1; transform: rotate(-9deg); color: var(--accent); background: var(--white); padding: 2px 8px; border: 2px solid var(--ink); }
.kd-acard-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.kd-acard h3 { font-family: var(--f-display); font-weight: 700; font-size: clamp(30px, 2.6vw, 40px); line-height: .95; margin: 0; }
.kd-acard p { margin: 0; font-size: 15.5px; color: var(--ink); }
.kd-acard-meta { margin-top: auto; font-family: var(--f-mono); font-size: 13px; }
.kd-acard--lead { grid-column: span 2; }
.kd-acard--lead a { flex-direction: row; }
.kd-acard--lead .kd-acard-art { aspect-ratio: auto; flex: 1.1; border-bottom: 0; border-inline-end: var(--line) solid var(--ink); min-height: 340px; }
.kd-acard--lead .kd-acard-body { flex: 1; justify-content: center; }
.kd-acard--lead h3 { font-size: clamp(40px, 4vw, 64px); }

.kd-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.kd-filter button { border: 2px solid var(--ink); background: var(--white); color: var(--ink); border-radius: 999px; padding: 8px 14px; font: 500 14px/1 var(--f-body); cursor: pointer; }
.kd-filter button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.kd-pager { max-width: var(--max); margin: 0 auto 80px; padding: 0 var(--pad); }
.kd-pager .nav-links { display: flex; gap: 10px; }
.kd-pager a, .kd-pager span { border: 2px solid var(--ink); padding: 8px 14px; text-decoration: none; }

/* ---------- cursor ---------- */
.kd-cursor {
	position: fixed; left: 0; top: 0; z-index: 9999; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
	background: #fff; mix-blend-mode: difference; pointer-events: none; transform: translate3d(-100px, -100px, 0);
	transition: width .25s var(--spring), height .25s var(--spring), margin .25s var(--spring);
}
.kd-cursor.is-hover { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
@media (hover: none), (pointer: coarse) { .kd-cursor { display: none; } }

/* ---------- page turns (cross document view transitions) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: kd-turn-out .6s var(--ease) both; }
::view-transition-new(root) { animation: kd-turn-in .6s var(--ease) both; }
html[dir="rtl"]::view-transition-old(root) { animation-name: kd-turn-out-rtl; }
html[dir="rtl"]::view-transition-new(root) { animation-name: kd-turn-in-rtl; }
@keyframes kd-turn-out { to { transform: perspective(1600px) translateX(-18%) rotateY(18deg); opacity: 0; } }
@keyframes kd-turn-in { from { transform: perspective(1600px) translateX(14%) rotateY(-12deg); opacity: 0; } }
@keyframes kd-turn-out-rtl { to { transform: perspective(1600px) translateX(18%) rotateY(-18deg); opacity: 0; } }
@keyframes kd-turn-in-rtl { from { transform: perspective(1600px) translateX(-14%) rotateY(12deg); opacity: 0; } }

@keyframes kd-ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); } 100% { box-shadow: 0 0 0 10px color-mix(in srgb, currentColor 0%, transparent); } }
@keyframes kd-blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@keyframes kd-pop { from { opacity: 0; transform: scale(.92) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes kd-bob { 0%, 88%, 100% { transform: none; } 91% { transform: rotate(-6deg) translateY(-4px); } 94% { transform: rotate(5deg); } 97% { transform: rotate(-3deg); } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
	.kd-nav { display: none; }
	.kd-top-in { grid-template-columns: auto 1fr; }
	.kd-top-act { justify-self: end; }
	.kd-menu-in { grid-template-columns: 1fr; }
	.kd-menu-side { order: -1; }
	.kd-foot-grid { grid-template-columns: repeat(2, 1fr); }
	.kd-article-grid { grid-template-columns: 1fr; }
	.kd-article-side > * { position: static; }
	.kd-agrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.kd-ahero-in { max-width: 100%; }
	.kd-ahero-kaede { opacity: .3; max-width: 70%; }
	.kd-ahero-sfx { inset-inline-end: var(--pad); top: 8%; }
}
@media (max-width: 700px) {
	body.kd { font-size: 16px; }
	.kd-ahero--hub .kd-ahero-sfx { display: none; }
	.kd-top-in { height: 66px; gap: 10px; }
	.kd-brand-word { font-size: 18px; }
	.kd-brand-face { width: 42px; height: 42px; }
	.kd-hanko, .kd-talk { display: none; }
	.kd-lang { width: 40px; height: 40px; }
	.kd-burger { width: 44px; height: 44px; }
	.kd-menu { top: 69px; }
	.kd-menu-services { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
	.kd-mp--hero { grid-column: span 2; }
	.kd-foot-cta { grid-template-columns: 1fr; padding-top: 56px; }
	.kd-foot-kaede { max-height: 260px; order: 2; }
	.kd-foot-bubble { margin-bottom: 20px; padding: 24px; }
	.kd-foot-grid { grid-template-columns: 1fr; gap: 28px; }
	.kd-agrid { grid-template-columns: 1fr; }
	.kd-acard--lead { grid-column: auto; }
	.kd-acard--lead a { flex-direction: column; }
	.kd-acard--lead .kd-acard-art { flex: none; min-height: 0; aspect-ratio: 16 / 10; border-inline-end: 0; border-bottom: var(--line) solid var(--ink); }
	.kd-prose { font-size: 17.5px; }
	.kd-fab span { display: none; }
	.kd-float { flex-direction: row; align-items: center; bottom: 12px; inset-inline-end: 12px; gap: 8px; }
	.kd-fab img { width: 42px; height: 42px; }
	.kd-dock { flex-direction: row; gap: 8px; margin: 0; }
	.kd-dock-btn { width: 44px; height: 44px; box-shadow: 3px 3px 0 var(--ink); }
	.kd-dock-btn svg { width: 22px; height: 22px; }
	.kd-dock-btn span { display: none; }
	.kd-fab { padding: 5px; }
	.kd-chat { inset: 0; width: auto; height: auto; border-radius: 0; border: 0; box-shadow: none; }
	.kd-ahero { min-height: 0; }
	.kd-ahero-kaede { height: 260px; opacity: .22; }
}
/* Still mode (dock pause button, Ally's pause, or reduced motion): nothing on the page moves by itself. */
html.kd-still *, html.kd-still *::before, html.kd-still *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
html.kd-still [data-kd-reveal]:not(.is-in) { clip-path: none; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
	.kd-js [data-kd-reveal]:not(.is-in) { clip-path: none; }
	@view-transition { navigation: none; }
}

/* Kaede art is transparent PNG; only the animations (white background video) still multiply onto the paper */
body.kd video[data-kdw-video] { mix-blend-mode: multiply; }
html[dir="ltr"] .kd-chat { transform-origin: bottom right; }

/* Elementor clears shadows on links inside its content (.elementor a); link buttons keep their manga shadow. */
.elementor a.kd-btn { box-shadow: 5px 5px 0 var(--ink); }
.elementor a.kd-btn:hover { box-shadow: 8px 8px 0 var(--ink); }
.elementor a.kd-btn:active { box-shadow: 1px 1px 0 var(--ink); }
.elementor a.kd-btn--ink { box-shadow: 5px 5px 0 var(--paper), 8px 8px 0 var(--accent); }
.elementor a.kd-btn--ink:hover { box-shadow: 7px 7px 0 var(--paper), 11px 11px 0 var(--accent); }
