/* =========================================================
   あけがわら整骨院 Web予約 — 患者さん向け画面
   すべて .akg の中に閉じ込め、テーマのスタイルと干渉しないようにしています。
   ========================================================= */
.akg {
  --g: #3C7F2C;          /* main green (院のブログと同じ緑) */
  --g-deep: #2E6421;
  --g-ink: #2A5A1E;      /* 文字用の緑 7:1 */
  --g-soft: #E4F0DD;
  --g-tint: rgba(60, 127, 44, .08);
  --g-tint-2: rgba(60, 127, 44, .16);
  --o: #E07B1F;          /* accent orange */
  --o-ink: #A4520C;
  --bg: #F4F7F1;
  --paper: #FFFFFF;
  --ink: #22302A;
  --ink-2: #3D4A43;
  --muted: #56635B;
  --line: rgba(34, 48, 42, .13);
  --line-2: rgba(34, 48, 42, .24);
  --danger: #A23B2A;
  --r: 12px;
  --r-sm: 8px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "YuGothic", "Meiryo", "Noto Sans JP", "Noto Sans CJK JP", sans-serif;

  container-type: inline-size;
  container-name: akg;
  position: relative;
  isolation: isolate;
  margin: 0 auto;
  max-width: 1200px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: .02em;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.akg *, .akg *::before, .akg *::after { box-sizing: border-box; }
.akg p, .akg h2, .akg h3, .akg dl, .akg dd, .akg figure { margin: 0; padding: 0; }
.akg ul, .akg ol { margin: 0; padding: 0; list-style: none; }
.akg li { margin: 0; padding: 0; }
.akg li::before, .akg li::marker { content: none; }
.akg button { font: inherit; color: inherit; letter-spacing: inherit; text-transform: none; box-shadow: none; text-shadow: none; }
.akg input, .akg textarea { font: inherit; color: var(--ink); letter-spacing: normal; }
.akg a { color: var(--g-ink); }
.akg [hidden] { display: none !important; }
.akg svg { max-width: none; }
.akg .akg-ico { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.akg :focus-visible { outline: 3px solid rgba(60, 127, 44, .55); outline-offset: 2px; border-radius: 6px; }

.akg-app { position: relative; z-index: 1; }
.akg .akg-eyebrow { font-size: 13px; letter-spacing: .14em; color: var(--g-ink); font-weight: 700; }
.akg .akg-h1 { font-size: 28px; font-weight: 800; line-height: 1.3; letter-spacing: .06em; color: var(--ink); border: 0; padding: 0; margin: 0; background: none; }
.akg .akg-h1::before, .akg .akg-h1::after, .akg .akg-h2::before, .akg .akg-h2::after { content: none; }
.akg .akg-h2 { font-size: 24px; font-weight: 800; line-height: 1.4; letter-spacing: .05em; color: var(--ink); border: 0; padding: 0; margin: 0; background: none; }
.akg .akg-lead { color: var(--muted); font-size: 15px; }
.akg .akg-hint { color: var(--muted); font-size: 14px; line-height: 1.6; }
.akg .akg-label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.akg .akg-label .akg-ico { color: var(--g); }
.akg .akg-panel { background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: var(--r); }

/* ---------- soft moving light (inside the widget only) ---------- */
.akg-glow { position: absolute; inset: -30px 0 0; z-index: 0; pointer-events: none; overflow: hidden; border-radius: 24px; }
.akg-glow i { position: absolute; display: block; border-radius: 50%; will-change: transform, opacity; animation: akgDrift 16s ease-in-out infinite alternate; }
.akg-glow i:nth-child(1) { width: 640px; height: 640px; left: -260px; top: -240px; background: radial-gradient(circle, rgba(124, 186, 92, .30) 0%, rgba(124, 186, 92, .12) 35%, rgba(124, 186, 92, 0) 68%); }
.akg-glow i:nth-child(2) { width: 560px; height: 560px; right: -220px; top: 40px; background: radial-gradient(circle, rgba(240, 190, 110, .26) 0%, rgba(240, 190, 110, .10) 36%, rgba(240, 190, 110, 0) 68%); animation-duration: 20s; animation-delay: -6s; animation-name: akgDrift2; }
.akg-glow i:nth-child(3) { width: 520px; height: 520px; left: 30%; bottom: -320px; background: radial-gradient(circle, rgba(150, 200, 170, .26) 0%, rgba(150, 200, 170, .10) 36%, rgba(150, 200, 170, 0) 68%); animation-duration: 14s; animation-delay: -3s; animation-name: akgDrift3; }
@keyframes akgDrift { from { transform: translate3d(0, 0, 0); opacity: .75; } to { transform: translate3d(64px, 40px, 0); opacity: 1; } }
@keyframes akgDrift2 { from { transform: translate3d(0, 0, 0); opacity: 1; } to { transform: translate3d(-56px, 52px, 0); opacity: .7; } }
@keyframes akgDrift3 { from { transform: translate3d(0, 0, 0); opacity: .7; } to { transform: translate3d(44px, -60px, 0); opacity: 1; } }
.akg.is-hidden-tab .akg-glow i { animation-play-state: paused; }

/* ---------- header & progress ---------- */
.akg-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; padding: 10px 0 14px; }
.akg .akg-progress { position: relative; display: flex; justify-content: space-between; width: min(560px, 100%); justify-self: center; }
.akg .akg-progress li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 84px; }
.akg-progress__dot { position: relative; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 1.5px solid var(--line-2); font-size: 13px; font-weight: 700; color: var(--muted); transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease); }
.akg-progress__dot b { transition: opacity .2s var(--ease); }
.akg-progress__dot svg { position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.akg-progress__dot svg path { stroke-dasharray: 16; stroke-dashoffset: 16; transition: stroke-dashoffset .42s var(--ease) .12s; }
.akg-progress__label { font-size: 13px; color: var(--muted); white-space: nowrap; }
.akg .akg-progress li.is-current .akg-progress__dot { border-color: var(--g); color: var(--g-ink); background: #fff; box-shadow: 0 0 0 4px var(--g-tint-2); }
.akg .akg-progress li.is-current .akg-progress__label { color: var(--ink); font-weight: 700; }
.akg .akg-progress li.is-done .akg-progress__dot { background: var(--g); border-color: var(--g); }
.akg .akg-progress li.is-done .akg-progress__dot b { opacity: 0; }
.akg .akg-progress li.is-done .akg-progress__dot svg path { stroke-dashoffset: 0; }
.akg-progress__line { position: absolute; left: 42px; right: 42px; top: 13px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.akg-progress__fill { position: absolute; inset: 0; background: var(--g); transform-origin: left; transform: scaleX(0); transition: transform .56s var(--ease); }
.akg .akg-tel { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 12px; min-height: 48px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 18px; line-height: 1.2; letter-spacing: .04em; transition: border-color .16s var(--ease), background-color .16s var(--ease); }
.akg .akg-tel small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.akg .akg-tel .akg-ico { color: var(--g); }
.akg .akg-tel:hover { border-color: var(--g); background: var(--g-tint); }

/* ---------- steps & transitions ---------- */
.akg-stage { position: relative; padding-bottom: 20px; }
.akg-step { position: relative; }
.akg-step.is-leaving { position: absolute; inset: 0 0 auto 0; pointer-events: none; }
.akg-step.is-entering.fwd { animation: akgInF .44s var(--ease) both; }
.akg-step.is-entering.back { animation: akgInB .44s var(--ease) both; }
.akg-step.is-leaving.fwd { animation: akgOutF .32s var(--ease) both; }
.akg-step.is-leaving.back { animation: akgOutB .32s var(--ease) both; }
@keyframes akgInF { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes akgInB { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes akgOutF { to { opacity: 0; transform: translateX(-24px); } }
@keyframes akgOutB { to { opacity: 0; transform: translateX(24px); } }
@keyframes akgRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.akg-step__head { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin: 0 0 14px; }

/* ---------- segmented control (初診/再診) ---------- */
.akg-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; margin-left: auto; }
.akg-seg__pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--g); transform: translateX(0); opacity: 0; transition: transform .36s var(--ease), opacity .2s; }
.akg-seg[data-v="first"] .akg-seg__pill { opacity: 1; }
.akg-seg[data-v="repeat"] .akg-seg__pill { opacity: 1; transform: translateX(100%); }
.akg .akg-seg button { position: relative; z-index: 1; min-height: 44px; min-width: 120px; padding: 0 18px; border: 0; background: none; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 15px; color: var(--ink); transition: color .25s var(--ease); }
.akg .akg-seg button[aria-checked="true"] { color: #fff; }
.akg-seg.is-attn { animation: akgShake .5s var(--ease); box-shadow: 0 0 0 3px rgba(224, 123, 31, .35); }
@keyframes akgShake { 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-2px); } 80% { transform: translateX(2px); } }

/* ---------- menus ---------- */
.akg-menus { display: grid; gap: 18px; }
.akg .akg-mgroup__title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; color: var(--g-ink); margin: 0 0 8px; }
.akg-mgroup__title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.akg-mgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.akg-mgroup--insurance .akg-mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.akg .akg-menu { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 4px 14px; align-items: start; width: 100%; text-align: left; padding: 14px 52px 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r); background: #fff; cursor: pointer; transition: transform .2s var(--ease), border-color .2s var(--ease), background-color .24s var(--ease), box-shadow .24s var(--ease); }
.akg .akg-menu:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 10px 22px -18px rgba(34, 48, 42, .55); }
.akg .akg-menu:active { transform: translateY(-1px) scale(.99); }
.akg-menu__icon { grid-row: span 3; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--g-soft); color: var(--g-deep); transition: background-color .24s var(--ease), color .24s var(--ease); }
.akg-menu__icon .akg-ico { width: 24px; height: 24px; }
.akg-menu__name { font-size: 17px; font-weight: 800; line-height: 1.4; color: var(--ink); }
.akg-menu__desc { font-size: 14px; color: var(--muted); line-height: 1.55; }
.akg-menu__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 4px; }
.akg-menu__price { font-size: 16px; font-weight: 800; color: var(--ink); }
.akg-menu__min { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.akg-menu__min .akg-ico { width: 15px; height: 15px; }
.akg-check { position: absolute; right: 14px; top: 14px; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line-2); background: #fff; transition: background-color .22s var(--ease), border-color .22s var(--ease); }
.akg-check svg { width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.akg-check path { stroke-dasharray: 18; stroke-dashoffset: 18; transition: stroke-dashoffset .34s var(--ease) .06s; }
.akg .akg-menu.is-selected { border-color: var(--g); background: #F5FAF2; box-shadow: 0 0 0 1px var(--g) inset; }
.akg .akg-menu.is-selected .akg-check { background: var(--g); border-color: var(--g); }
.akg .akg-menu.is-selected .akg-check path { stroke-dashoffset: 0; }
.akg .akg-menu.is-selected .akg-menu__icon { background: var(--g); color: #fff; }
.akg .akg-note { margin-top: 12px; display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.akg .akg-note .akg-ico { color: var(--g); width: 18px; height: 18px; margin-top: 2px; }
.akg-stagger > * { animation: akgRise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }

/* ---------- calendar & slots ---------- */
.akg-dt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.akg-cal { padding: 14px 18px 12px; }
.akg-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.akg-cal__title { font-size: 19px; font-weight: 800; letter-spacing: .06em; }
.akg .akg-icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink); transition: background-color .16s var(--ease), border-color .16s var(--ease), transform .12s var(--ease); }
.akg .akg-icon-btn:hover { border-color: var(--g); background: var(--g-tint); }
.akg .akg-icon-btn:active { transform: scale(.94); }
.akg .akg-icon-btn[disabled] { opacity: .3; cursor: not-allowed; }
.akg-cal__dow { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 13px; color: var(--muted); padding: 4px 0; }
.akg-cal__dow span:first-child { color: #A2402F; }
.akg-cal__dow span:last-child { color: #3E5A84; }
.akg-cal__vp { overflow: hidden; }
.akg-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; min-height: 290px; align-content: start; }
.akg-cal__grid.akg-slide-1 { animation: akgCalF .38s var(--ease) both; }
.akg-cal__grid.akg-slide--1 { animation: akgCalB .38s var(--ease) both; }
@keyframes akgCalF { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes akgCalB { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
.akg .akg-day { position: relative; height: 46px; border: 0; background: none; padding: 0; cursor: pointer; font-size: 16px; font-weight: 700; display: grid; place-items: center; isolation: isolate; color: var(--ink); font-variant-numeric: tabular-nums; }
.akg .akg-day::before { content: ""; position: absolute; width: 42px; height: 42px; left: 50%; top: 50%; margin: -21px 0 0 -21px; border-radius: 50%; z-index: -1; background: var(--g); transform: scale(0); opacity: 0; transition: transform .36s var(--ease), opacity .2s var(--ease); }
.akg .akg-day::after { content: ""; position: absolute; width: 42px; height: 42px; left: 50%; top: 50%; margin: -21px 0 0 -21px; border-radius: 50%; z-index: -2; border: 1.5px solid transparent; transition: border-color .16s var(--ease); }
.akg .akg-day:not([disabled]):hover::after { border-color: var(--g); }
.akg .akg-day.is-selected { color: #fff; }
.akg .akg-day.is-selected::before { transform: scale(1); opacity: 1; }
.akg .akg-day.is-today .akg-num { text-decoration: underline; text-decoration-color: var(--o); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.akg .akg-day[disabled] { cursor: default; color: rgba(34, 48, 42, .36); font-weight: 400; }
.akg-day .akg-tag { position: absolute; bottom: 1px; left: 0; right: 0; font-size: 11px; line-height: 1; font-weight: 700; letter-spacing: 0; }
.akg .akg-day.is-closed .akg-tag { color: var(--muted); }
.akg .akg-day.is-full .akg-tag { color: var(--o-ink); }
.akg .akg-day.is-out { visibility: hidden; }
.akg .akg-day.is-loading { color: transparent; }
.akg .akg-day.is-loading::after { border-color: transparent; background: linear-gradient(90deg, rgba(34,48,42,.05), rgba(34,48,42,.1), rgba(34,48,42,.05)); background-size: 200% 100%; animation: akgShimmer 1.2s linear infinite; width: 30px; height: 18px; margin: -9px 0 0 -15px; border-radius: 6px; }
@keyframes akgShimmer { to { background-position: -200% 0; } }
.akg .akg-legend { margin-top: 8px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.akg-lg { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 700; margin-left: 8px; }
.akg-lg:first-child { margin-left: 0; }
.akg-lg--sel { background: var(--g); }
.akg-lg--off { color: var(--muted); border: 1px solid var(--line-2); }
.akg-lg--full { color: var(--o-ink); border: 1px solid var(--line-2); }

.akg-slots-panel { padding: 14px 18px 16px; }
.akg-slots-panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.akg-slots { display: grid; gap: 12px; min-height: 120px; }
.akg .akg-sgroup__label { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.akg-sgroup__label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.akg-sgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.akg .akg-slots-empty { display: grid; place-items: center; min-height: 140px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); color: var(--muted); font-size: 15px; text-align: center; padding: 0 16px; }
.akg .akg-slot { position: relative; min-height: 52px; padding: 0 4px 10px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: #fff; cursor: pointer; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: center; gap: 4px; color: var(--ink); transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .14s var(--ease); }
.akg .akg-slot:hover:not([disabled]) { border-color: var(--g); background: var(--g-tint); }
.akg .akg-slot:active:not([disabled]) { transform: scale(.96); }
.akg-slot__sub { position: absolute; bottom: 3px; left: 0; right: 0; font-size: 11px; font-weight: 700; line-height: 1; color: var(--g-ink); }
.akg .akg-slot[disabled] { cursor: not-allowed; color: rgba(34, 48, 42, .4); background: repeating-linear-gradient(135deg, rgba(34, 48, 42, .05) 0 4px, transparent 4px 8px); border-style: dashed; font-weight: 500; }
.akg .akg-slot[disabled] .akg-slot__sub { color: var(--o-ink); }
.akg-mini-check { width: 0; height: 18px; overflow: hidden; display: inline-flex; transition: width .2s var(--ease); }
.akg-mini-check svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.akg-mini-check path { stroke-dasharray: 16; stroke-dashoffset: 16; transition: stroke-dashoffset .3s var(--ease) .08s; }
.akg .akg-slot.is-selected { background: var(--g); color: #fff; border-color: var(--g); }
.akg .akg-slot.is-selected .akg-slot__sub { color: #E4F0DD; }
.akg .akg-slot.is-selected .akg-mini-check { width: 18px; }
.akg .akg-slot.is-selected .akg-mini-check path { stroke-dashoffset: 0; }
.akg .akg-notice { margin-top: 12px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--g-tint); color: var(--g-ink); font-size: 15px; display: flex; gap: 8px; align-items: flex-start; animation: akgRise .36s var(--ease) both; }
.akg .akg-notice .akg-ico { margin-top: 3px; width: 18px; height: 18px; }
.akg .akg-notice--warn { background: rgba(224, 123, 31, .12); color: #8A440A; }

/* ---------- form ---------- */
.akg-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.akg-form__col { padding: 6px 20px 18px; display: grid; gap: 2px; }
.akg .akg-field { display: grid; gap: 6px; padding-top: 12px; margin: 0; }
.akg .akg-field__label { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.akg .akg-req, .akg .akg-opt { display: inline-block; font-size: 11px; font-weight: 700; line-height: 1; padding: 4px 6px; border-radius: 4px; letter-spacing: .04em; }
.akg .akg-req { background: var(--o); color: #fff; }
.akg .akg-opt { background: rgba(34, 48, 42, .08); color: var(--muted); }
.akg .akg-field input, .akg .akg-field textarea { width: 100%; min-height: 50px; margin: 0; padding: 10px 14px; font-size: 17px; line-height: 1.5; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: #fff; box-shadow: none; transition: border-color .16s var(--ease), box-shadow .16s var(--ease); }
.akg .akg-field textarea { min-height: 128px; resize: vertical; }
.akg .akg-field input::placeholder, .akg .akg-field textarea::placeholder { color: #8A948E; }
.akg .akg-field input:focus, .akg .akg-field textarea:focus { outline: none; border-color: var(--g); box-shadow: 0 0 0 4px var(--g-tint-2); }
.akg .akg-field.is-invalid input, .akg .akg-field.is-invalid textarea { border-color: var(--danger); }
.akg .akg-err { font-size: 14px; color: var(--danger); font-weight: 700; min-height: 0; }
.akg .akg-err:empty { display: none; }
.akg .akg-email-hint { display: flex; gap: 6px; align-items: flex-start; }
.akg .akg-email-hint .akg-ico { width: 17px; height: 17px; color: var(--o); margin-top: 2px; }
.akg .akg-count { justify-self: end; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.akg .akg-trap { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.akg .akg-agree { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; margin-top: 14px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #FAFCF8; cursor: pointer; font-size: 15px; line-height: 1.6; transition: border-color .16s var(--ease); }
.akg .akg-agree:hover { border-color: var(--g); }
.akg .akg-agree input { position: absolute; opacity: 0; width: 28px; height: 28px; margin: 0; left: 14px; top: 12px; cursor: pointer; }
.akg-agree__box { width: 28px; height: 28px; border-radius: 6px; border: 1.5px solid var(--line-2); background: #fff; display: grid; place-items: center; transition: background-color .18s var(--ease), border-color .18s var(--ease); }
.akg-agree__box svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.akg-agree__box path { stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset .3s var(--ease) .05s; }
.akg .akg-agree input:checked + .akg-agree__box { background: var(--g); border-color: var(--g); }
.akg .akg-agree input:checked + .akg-agree__box path { stroke-dashoffset: 0; }
.akg .akg-agree input:focus-visible + .akg-agree__box { outline: 3px solid rgba(60, 127, 44, .55); outline-offset: 2px; }
.akg .akg-agree.is-invalid { border-color: var(--danger); }
.akg .akg-privacy { margin-left: 6px; font-weight: 700; }

/* ---------- confirm ---------- */
.akg-confirm { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 18px; align-items: start; }
.akg-confirm__main, .akg-confirm__side { padding: 6px 22px 16px; }
.akg .akg-sum > div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.akg .akg-sum > div:last-child { border-bottom: 0; }
.akg .akg-sum dt { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 6px; font-weight: 600; }
.akg .akg-sum dt .akg-ico { width: 17px; height: 17px; color: var(--g); }
.akg .akg-sum dd { font-size: 17px; font-weight: 700; word-break: break-word; }
.akg .akg-sum dd small { display: block; font-weight: 500; color: var(--muted); font-size: 14px; }
.akg .akg-sum dd.akg-big { font-size: 22px; letter-spacing: .02em; }
.akg-bring { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: #FFF6EC; color: #7A3E08; font-size: 15px; font-weight: 600; }
.akg-bring .akg-ico { color: var(--o); margin-top: 2px; }

/* ---------- done / manage ticket ---------- */
.akg-done { display: grid; justify-items: center; gap: 14px; padding: 4px 0 16px; perspective: 1200px; }
.akg-done__check { width: 56px; height: 56px; fill: none; stroke: var(--g); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.akg-done__check circle { stroke-dasharray: 183; stroke-dashoffset: 183; }
.akg-done__check path { stroke-dasharray: 40; stroke-dashoffset: 40; }
.akg-step--done.akg-play .akg-done__check circle { animation: akgDraw .7s var(--ease) .08s forwards; }
.akg-step--done.akg-play .akg-done__check path { animation: akgDraw .42s var(--ease) .6s forwards; }
@keyframes akgDraw { to { stroke-dashoffset: 0; } }
.akg-ticket { position: relative; width: min(620px, 100%); background: #fff; border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 30px 50px -40px rgba(34, 48, 42, .55); overflow: hidden; transform-origin: 50% 100%; }
.akg-step--done.akg-play .akg-ticket { animation: akgCard .9s var(--ease) .78s both; }
@keyframes akgCard { from { opacity: 0; transform: translateY(26px) rotateX(9deg); } to { opacity: 1; transform: none; } }
.akg-ticket__top { padding: 22px 28px 16px; background: linear-gradient(135deg, #EAF4E4, #F7FBF4); text-align: center; }
.akg .akg-ticket__title { font-size: 24px; font-weight: 800; letter-spacing: .08em; margin-top: 2px; }
.akg .akg-ticket__no { margin-top: 4px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.akg-ticket__perf { display: block; position: relative; height: 0; border-top: 2px dashed var(--line-2); margin: 0 18px; }
.akg-ticket__perf::before, .akg-ticket__perf::after { content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-2); }
.akg-ticket__perf::before { left: -30px; }
.akg-ticket__perf::after { right: -30px; }
.akg .akg-ticket__dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; padding: 10px 28px 4px; }
.akg .akg-ticket__dl > div { padding: 9px 0; border-bottom: 1px solid var(--line); }
.akg .akg-ticket__dl > div.akg-wide { grid-column: 1 / -1; }
.akg .akg-ticket__dl dt { font-size: 12px; color: var(--muted); letter-spacing: .08em; font-weight: 600; }
.akg .akg-ticket__dl dd { font-size: 17px; font-weight: 800; }
.akg .akg-ticket__dl dd.akg-when { font-size: 21px; }
.akg .akg-step--done.akg-play .akg-ticket__dl > div { animation: akgRise .5s var(--ease) both; animation-delay: calc(1.25s + var(--i, 0) * 60ms); }
.akg-ticket__msg { padding: 12px 28px 4px; display: grid; gap: 8px; }
.akg-msg { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.akg-msg .akg-ico { color: var(--g); margin-top: 3px; width: 18px; height: 18px; }
.akg-msg--warn .akg-ico { color: var(--o); }
.akg-ticket__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 14px 28px 24px; }
.akg-step--done.akg-play .akg-ticket__msg, .akg-step--done.akg-play .akg-ticket__actions { animation: akgRise .5s var(--ease) 1.6s both; }
.akg-manage { padding: 10px 0 30px; display: grid; justify-items: center; }
.akg-manage .akg-ticket { animation: akgCard .7s var(--ease) both; }
.akg-manage__state { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; margin-top: 6px; }
.akg-manage__state.is-ok { background: var(--g); color: #fff; }
.akg-manage__state.is-cancel { background: #F6E1DC; color: var(--danger); }
.akg-manage__state svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.akg-manage__state svg path { stroke-dasharray: 16; animation: akgDraw16 .4s var(--ease) both .2s; stroke-dashoffset: 16; }
@keyframes akgDraw16 { to { stroke-dashoffset: 0; } }

/* ---------- buttons ---------- */
.akg .akg-btn { position: relative; overflow: hidden; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px; margin: 0; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font-size: 16px; font-weight: 800; letter-spacing: .06em; line-height: 1.2; cursor: pointer; white-space: nowrap; text-decoration: none; transition: transform .14s var(--ease), color .2s var(--ease), border-color .2s var(--ease), opacity .2s; }
.akg .akg-btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--g-deep); transform: translateX(-101%); transition: transform .46s var(--ease); }
.akg .akg-btn:hover::before { transform: translateX(0); }
.akg .akg-btn .akg-arrow, .akg .akg-btn .akg-arrow-back { transition: transform .2s var(--ease); }
.akg .akg-btn:hover .akg-arrow { transform: translateX(4px); }
.akg .akg-btn:hover .akg-arrow-back { transform: translateX(-4px); }
.akg .akg-btn:active { transform: translateY(1px) scale(.97); transition-duration: 80ms; }
.akg .akg-btn--primary { background: var(--g); border-color: var(--g); color: #fff; }
.akg .akg-btn--primary:hover { border-color: var(--g-deep); }
.akg .akg-btn--ghost { background: #fff; border-color: var(--line-2); }
.akg .akg-btn--ghost::before { background: var(--g-tint-2); }
.akg .akg-btn--ghost:hover { border-color: var(--g); }
.akg .akg-btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.akg .akg-btn--danger::before { background: #7F2B1E; }
.akg .akg-btn--line { background: #06C755; border-color: #06C755; color: #fff; }
.akg .akg-btn--line::before { background: #05A747; }
.akg .akg-btn[aria-disabled="true"] { opacity: .45; }
.akg .akg-btn[aria-disabled="true"]::before { display: none; }
.akg .akg-btn.is-busy { pointer-events: none; }
.akg .akg-btn.is-busy .akg-arrow { animation: akgNudge .9s var(--ease) infinite; }
@keyframes akgNudge { 50% { transform: translateX(5px); } }

/* ---------- action bar (sticky inside the widget) ---------- */
.akg-bar { position: sticky; bottom: 0; z-index: 20; margin: 0; padding: 0; }
.akg-bar__inner { display: flex; align-items: center; gap: 20px; min-height: 76px; padding: 10px 16px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px -24px rgba(34, 48, 42, .5); }
.akg-app[data-step="4"] .akg-bar, .akg-app[data-view="manage"] .akg-bar { display: none; }
.akg .akg-bar__sum { display: flex; flex-wrap: wrap; gap: 6px 8px; flex: 1; min-width: 0; }
.akg .akg-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.akg .akg-chip .akg-ico { width: 15px; height: 15px; color: var(--g); }
.akg .akg-chip.is-empty { color: var(--muted); border-style: dashed; background: transparent; font-weight: 500; }
.akg .akg-chip.is-new { animation: akgRise .32s var(--ease) both; }
.akg-bar__price { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; max-width: 260px; }
.akg-bar__price span { font-size: 12px; color: var(--muted); }
.akg-bar__price strong { font-size: 17px; font-weight: 800; text-align: right; }
.akg-bar__price strong.is-yen { font-size: 24px; font-variant-numeric: tabular-nums; }
.akg-bar__btns { display: flex; gap: 10px; }
.akg .akg-bar__btns .akg-btn { min-width: 108px; }
.akg .akg-bar__btns .akg-next { min-width: 170px; }

/* ---------- dialog & toast ---------- */
.akg-dialog { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 20px; }
.akg-dialog__scrim { position: absolute; inset: 0; background: rgba(34, 48, 42, .4); animation: akgFade .24s var(--ease) both; }
.akg-dialog__box { position: relative; width: min(440px, 100%); background: #fff; border-radius: 16px; padding: 24px 24px 20px; animation: akgDlg .28s var(--ease) both; box-shadow: 0 30px 60px -30px rgba(34, 48, 42, .5); }
.akg-dialog.is-closing .akg-dialog__scrim { animation: akgFadeOut .2s var(--ease) both; }
.akg-dialog.is-closing .akg-dialog__box { animation: akgDlgOut .2s var(--ease) both; }
@keyframes akgFade { from { opacity: 0; } }
@keyframes akgFadeOut { to { opacity: 0; } }
@keyframes akgDlg { from { opacity: 0; transform: scale(.95) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes akgDlgOut { to { opacity: 0; transform: scale(.97); } }
.akg .akg-dialog__title { font-size: 19px; font-weight: 800; }
.akg .akg-dialog__body { margin-top: 8px; color: var(--ink-2); }
.akg-dialog__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.akg-toast { position: fixed; left: 50%; bottom: 112px; z-index: 100001; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px); transition: opacity .26s var(--ease), transform .32s var(--ease); }
.akg-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.akg-toast .akg-ico { color: #BFE3A9; width: 18px; height: 18px; }

@container akg (min-width: 1000px) {
  .akg-sgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* =========================================================
   Responsive — container queries（置かれた場所の幅で切り替え）
   ========================================================= */
@container akg (max-width: 960px) {
  .akg-head { grid-template-columns: 1fr auto; }
  .akg .akg-progress { grid-column: 1 / -1; grid-row: 2; }
  .akg-mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container akg (max-width: 820px) {
  .akg-dt, .akg-form, .akg-confirm { grid-template-columns: 1fr; }
  .akg-cal__grid { min-height: 0; }
}
@container akg (max-width: 600px) {
  .akg .akg-h1 { font-size: 22px; }
  .akg .akg-h2 { font-size: 21px; }
  .akg-head { gap: 10px 12px; padding-top: 4px; }
  .akg .akg-tel { font-size: 15px; padding: 4px 12px 4px 10px; }
  .akg .akg-tel small { font-size: 10px; }
  .akg .akg-progress li { width: 58px; }
  .akg-progress__label { font-size: 11px; }
  .akg-progress__line { left: 29px; right: 29px; }
  .akg-step__head { align-items: flex-start; }
  .akg-seg { margin-left: 0; width: 100%; }
  .akg .akg-seg button { min-width: 0; }
  .akg-mgrid, .akg-mgroup--insurance .akg-mgrid { grid-template-columns: 1fr; }
  .akg-cal, .akg-slots-panel { padding: 12px; }
  .akg .akg-day { height: 44px; }
  .akg .akg-day::before, .akg .akg-day::after { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
  .akg-sgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .akg-form__col { padding: 4px 14px 14px; }
  .akg .akg-sum > div { grid-template-columns: 1fr; gap: 0; }
  .akg-confirm__main, .akg-confirm__side { padding: 4px 16px 12px; }
  .akg-ticket__top, .akg .akg-ticket__dl, .akg-ticket__msg, .akg-ticket__actions { padding-left: 18px; padding-right: 18px; }
  .akg .akg-ticket__dl { grid-template-columns: 1fr; }
  .akg .akg-ticket__actions .akg-btn { width: 100%; }
  .akg-bar { margin: 0; padding: 0; }
  .akg-bar__inner { flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px 12px; border-radius: 14px 14px 0 0; }
  .akg .akg-bar__sum { order: 1; width: 100%; flex: none; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .akg .akg-bar__sum::-webkit-scrollbar { display: none; }
  .akg-bar__price { order: 2; flex-direction: row; align-items: baseline; gap: 8px; margin-right: auto; max-width: 100%; }
  .akg-bar__price strong { text-align: left; font-size: 15px; }
  .akg-bar__price strong.is-yen { font-size: 20px; }
  .akg-bar__btns { order: 3; width: 100%; }
  .akg .akg-bar__btns .akg-btn { flex: 1; min-width: 0; padding: 0 14px; }
  .akg .akg-bar__btns .akg-next { flex: 2; min-width: 0; }
  .akg-dialog__actions .akg-btn { flex: 1; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .akg *, .akg *::before, .akg *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .akg-glow i { animation: none !important; }
  .akg-step.is-leaving { display: none; }
}
