/* Local appearance preferences: opaque bars and optional content wallpapers. */
:root[data-kyoto-season]{
  --season-paper:#fff7ee;
  --season-edge:#ead6c3;
  --season-top:url('/seasons/autumn-top.svg');
  --season-bottom:url('/seasons/autumn-bottom.svg');
  --bar-ink:#254538;
  --bar-muted:#4d6556;
  --bar-active:#e7f0d9;
  --bar-active-ink:#36592c;
}
:root[data-kyoto-season="spring"]{--season-paper:#fff4f6;--season-edge:#ecd7df;--season-top:url('/seasons/spring-top.svg');--season-bottom:url('/seasons/spring-bottom.svg')}
:root[data-kyoto-season="summer"]{--season-paper:#f0f8f1;--season-edge:#d0e2d3;--season-top:url('/seasons/summer-top.svg');--season-bottom:url('/seasons/summer-bottom.svg')}
:root[data-kyoto-season="winter"]{--season-paper:#f0f6fc;--season-edge:#d2deeb;--season-top:url('/seasons/winter-top.svg');--season-bottom:url('/seasons/winter-bottom.svg')}
:root[data-kyoto-season="court"]{--season-paper:#194f42;--season-edge:#357563;--season-top:url('/seasons/court-top.svg?v=acalon-382');--season-bottom:url('/seasons/court-bottom.svg?v=acalon-382');--bar-ink:#f2f7ed;--bar-muted:#e2efdf;--bar-active:#daf4a6;--bar-active-ink:#163a2e}
:root[data-kyoto-season="washi"]{--season-paper:#f4f0e5;--season-edge:#ded7c9;--season-top:url('/seasons/washi-top.svg?v=acalon-365');--season-bottom:url('/seasons/washi-bottom.svg?v=acalon-365');--bar-ink:#3c453e;--bar-muted:#585f55;--bar-active:#e6e0cf;--bar-active-ink:#414636}
:root[data-kyoto-season="night"]{--season-paper:#1f2946;--season-edge:#3d496b;--season-top:url('/seasons/night-top.svg');--season-bottom:url('/seasons/night-bottom.svg');--bar-ink:#f5f2e8;--bar-muted:#d2dbea;--bar-active:#f4d497;--bar-active-ink:#302d23}
:root[data-kyoto-season="players"]{--season-paper:#fff4df;--season-edge:#e9d6ae;--season-top:url('/seasons/players-top.svg');--season-bottom:url('/seasons/players-bottom.svg');--bar-ink:#294737;--bar-muted:#536448;--bar-active:#e0efbb;--bar-active-ink:#36542d}
:root[data-kyoto-season="beige"]{--season-paper:#efe4d4;--season-edge:#d7c4ae;--season-top:none;--season-bottom:none;--bar-ink:#493e31;--bar-muted:#5e5143;--bar-active:#fffaf2;--bar-active-ink:#5b4932}
/* The Japanese-paper style has its own palette, separate from the existing seasonal theme. */
:root[data-kyoto-season="washi"][data-washi-tone="spring"]{--season-paper:#f9eef2;--season-edge:#e6d1db;--season-top:url('/seasons/washi-spring-top.svg?v=acalon-365');--season-bottom:url('/seasons/washi-spring-bottom.svg');--bar-ink:#4d424a;--bar-muted:#655761;--bar-active:#eddce5;--bar-active-ink:#5b424f}
:root[data-kyoto-season="washi"][data-washi-tone="summer"]{--season-paper:#edf6f1;--season-edge:#cedfd6;--season-top:url('/seasons/washi-summer-top.svg?v=acalon-365');--season-bottom:url('/seasons/washi-summer-bottom.svg');--bar-ink:#354d46;--bar-muted:#52675f;--bar-active:#dcebe2;--bar-active-ink:#355646}
:root[data-kyoto-season="washi"][data-washi-tone="autumn"]{--season-paper:#faf0e5;--season-edge:#ead5bf;--season-top:url('/seasons/washi-autumn-top.svg?v=acalon-365');--season-bottom:url('/seasons/washi-autumn-bottom.svg');--bar-ink:#514637;--bar-muted:#6b5c49;--bar-active:#efdfca;--bar-active-ink:#604a32}
:root[data-kyoto-season="washi"][data-washi-tone="winter"]{--season-paper:#eff1f9;--season-edge:#d5d8e8;--season-top:url('/seasons/washi-winter-top.svg?v=acalon-365');--season-bottom:url('/seasons/washi-winter-bottom.svg');--bar-ink:#41475d;--bar-muted:#585f76;--bar-active:#dfe4f3;--bar-active-ink:#424e6a}
/* WebKit may sample the page background for the system status area. */
html[data-kyoto-season]:not([data-acalon-boot="loading"]),html[data-kyoto-season].acalon-frame:not([data-acalon-boot="loading"]) body{background-color:var(--season-paper)}
html[data-kyoto-season].acalon-frame .topbar,
html[data-kyoto-season] .member-top,
html[data-kyoto-season] .live-top,
html[data-kyoto-season] .system-top{
  background-color:var(--season-paper);
  background-image:var(--season-top);
  background-repeat:no-repeat;
  background-position:right center;
  background-size:auto 100%;
  border-bottom-color:var(--season-edge);
  color:var(--bar-ink);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
html[data-kyoto-season] .mobile-nav,
html[data-kyoto-season] .member-nav{
  background-color:var(--season-paper);
  background-image:var(--season-bottom);
  background-repeat:no-repeat;
  background-position:center bottom;
  background-size:auto 100%;
  border-top-color:var(--season-edge);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
html[data-kyoto-season] .action-dock{
  background-color:var(--season-paper);
  background-image:var(--season-top);
  background-repeat:no-repeat;
  background-position:left center;
  background-size:auto 100%;
  border-top-color:var(--season-edge);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
/* Never reuse the sun-bearing header illustration below the main content. */
html[data-kyoto-season="washi"] .action-dock{
  background-image:var(--season-bottom);
  background-position:center bottom;
}
html[data-kyoto-season] .mobile-nav button:not(.active),
html[data-kyoto-season] .member-nav .btn:not(.active){color:var(--bar-muted)}
html[data-kyoto-season] .mobile-nav button.active,
html[data-kyoto-season] .member-nav .btn.active{background:var(--bar-active);color:var(--bar-active-ink)}
html[data-kyoto-season] .action-dock .dock-message{color:var(--bar-ink)}
html[data-kyoto-season] .topbar .breadcrumb,
html[data-kyoto-season] .topbar .top-demo{color:var(--bar-muted)}
html[data-kyoto-season] .topbar .breadcrumb strong{color:var(--bar-ink)}
/* Light header controls need their own ink instead of inheriting dark-theme bar text. */
html[data-kyoto-season] .topbar .mobile-club{background:#fff;color:var(--ink)}
html[data-kyoto-season] .topbar .top-avatar{color:var(--ink)}
html[data-kyoto-season] .topbar .mobile-brand,
html[data-kyoto-season] .member-top .brand-lockup{isolation:isolate}
html[data-kyoto-season] .live-top .acalon-wordmark{content:url('/acalon-wordmark.svg');filter:none}
html[data-kyoto-season] .live-top .acalon-slogan{color:var(--bar-ink)}
html[data-kyoto-season] .live-top .slogan-finish{color:var(--bar-muted)}
.season-settings{margin:0 0 22px;display:grid;gap:9px}
.season-settings .form-field{margin:0}
.season-settings select{width:100%;min-height:44px;padding:11px 12px;border:1px solid #d5dfcf;border-radius:11px;background:#fff;color:#254a36;font:inherit;font-size:calc(14px * var(--font-scale,1))}
.season-settings select:focus-visible{outline:2px solid #477353;outline-offset:3px}
.season-settings .caption{line-height:1.65;margin:0}
.member-profile .season-settings{margin:0}
.washi-tone-controls{display:grid;gap:9px;border-top:1px solid #e2e6dc;padding-top:14px;margin-top:5px}
[data-washi-tone-controls][hidden]{display:none}
/* Dark bars keep the existing bright content panels and all semantic action colours. */
/* Use a detailed colour logo on dark bars; a whitening filter erases the shuttle/racket lines. */
html:is([data-kyoto-season="night"],[data-kyoto-season="court"]) :is(.topbar,.member-top,.live-top,.system-top) .acalon-wordmark{content:url('/acalon-wordmark-dark.svg?v=acalon-382');filter:none}
html:is([data-kyoto-season="night"],[data-kyoto-season="court"]) :is(.topbar,.member-top,.live-top,.system-top) .acalon-slogan{color:#e0eecb}
html:is([data-kyoto-season="night"],[data-kyoto-season="court"]) :is(.topbar,.member-top,.live-top,.system-top) .slogan-finish{color:#f4d497}
html:is([data-kyoto-season="night"],[data-kyoto-season="court"]) .topbar .top-demo .dot{background:#c8e599}
html:is([data-kyoto-season="night"],[data-kyoto-season="court"]) .system-top .btn.ghost{background:#f4f6ee;color:#254538}
html[data-kyoto-season="beige"] :is(.topbar,.member-top,.live-top,.system-top) .acalon-slogan{color:#66533c}
html[data-kyoto-season="beige"] :is(.topbar,.member-top,.live-top,.system-top) .slogan-finish{color:#936f51}

/* Floating action pill: the navigation keeps its artwork, actions use a plain surface. */
html[data-kyoto-season] .action-dock.dock-pill{
  left:auto;
  right:20px;
  bottom:16px;
  width:max-content;
  max-width:calc(100vw - var(--sidebar,0px) - 40px);
  min-height:0;
  padding:4px;
  gap:0;
  border:1px solid var(--season-edge);
  border-radius:30px;
  background-color:var(--season-paper);
  background-image:none;
  box-shadow:0 4px 16px #183b2820;
}
html[data-kyoto-season] .action-dock.dock-pill .dock-message{
  /* Keep the status available to assistive technology without a full-width bar. */
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
  border:0;
  display:block;
}
html[data-kyoto-season] .action-dock.dock-pill .dock-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  min-width:0;
  width:auto;
}
html[data-kyoto-season] .action-dock.dock-pill .dock-actions .btn{
  min-width:44px;
  min-height:44px;
  padding:10px 12px;
  gap:6px;
  border-radius:999px;
  white-space:normal;
  text-align:center;
  font-size:calc(11px * var(--font-scale,1));
  line-height:1.2;
}
html[data-kyoto-season] .action-dock.dock-pill .dock-actions .icon-btn{
  flex:0 0 44px;
  min-width:44px;
  width:44px;
  height:44px;
  padding:0;
  border-radius:50%;
}
html[data-kyoto-season] .action-dock.dock-pill-simple{max-width:min(48vw,240px)}
html[data-kyoto-season] .action-dock.dock-pill-simple .dock-actions{width:100%}
html[data-kyoto-season] .action-dock.dock-pill-simple .dock-actions .btn{width:100%;font-size:calc(12px * var(--font-scale,1))}
/* The second A is centred at x=141 in the 342-unit wordmark. */
.member-top .member-brand{--lockup-width:170px;width:var(--lockup-width);max-width:none;overflow:visible}
.member-top .member-brand .acalon-wordmark{width:var(--lockup-width)}
.member-top .member-brand .acalon-slogan{margin:3px 0 4px calc(var(--lockup-width) * .4123);font-size:21px;letter-spacing:.1px}
@media(max-width:700px){
  /* Header is 20% shorter than v0.36.6; the footer and system insets do not shrink. */
  html.acalon-frame{
    --app-bar-content-height:calc(76px - 3mm + (var(--font-scale,1) - 1) * 45px);
    --app-header-height:calc(var(--app-bar-content-height) * .8 + env(safe-area-inset-top,0px));
  }
  html.acalon-frame .topbar{min-height:0;padding-top:calc(2px + env(safe-area-inset-top,0px));padding-bottom:2px}
  html.acalon-frame .mobile-nav{height:calc(var(--app-bar-content-height) + env(safe-area-inset-bottom,0px))}
  html[data-kyoto-season] .action-dock.dock-pill{
    right:12px;
    bottom:calc(84px - 3mm + (var(--font-scale,1) - 1) * 45px + env(safe-area-inset-bottom,0px));
    max-width:calc(100vw - 24px);
  }
  html[data-kyoto-season] .action-dock.dock-pill-simple{max-width:48vw}
  html.acalon-frame .workspace:has(.dock-pill.has-draft)>main{padding-bottom:calc(188px + (var(--font-scale,1) - 1) * 45px + env(safe-area-inset-bottom,0px))}
  .topbar .mobile-brand{--lockup-width:104px;width:var(--lockup-width);min-width:var(--lockup-width);padding:0 6px;overflow:visible}
  .topbar .mobile-brand img.acalon-wordmark{width:var(--lockup-width)}
  .topbar .mobile-brand .acalon-slogan{margin:1px 0 0 calc(var(--lockup-width) * .4123);font-size:clamp(16.5px,4.5vw,19px);line-height:1.02;letter-spacing:.1px}
}
@media(max-width:480px){
  .member-top .member-brand{--lockup-width:140px}
  .member-top .member-brand .acalon-slogan{font-size:clamp(18px,5vw,21px)}
}
@media(max-width:360px){
  .topbar .mobile-brand{--lockup-width:96px}
  .member-top .member-brand{--lockup-width:120px}
  .topbar .mobile-brand .acalon-slogan{font-size:16.5px}
  .member-top .member-brand .acalon-slogan{font-size:17px}
  html[data-kyoto-season] .action-dock.dock-pill .dock-actions{gap:4px}
  html[data-kyoto-season] .action-dock.dock-pill .dock-actions .btn{padding-left:9px;padding-right:9px}
}

/* MEMBER: one compact content row; keep the iOS safe area and sticky paint. */
@media(max-width:700px){
  .member-top{min-height:calc(48px + env(safe-area-inset-top,0px));padding:calc(2px + env(safe-area-inset-top,0px)) 12px 2px;gap:8px}
  .member-top .member-brand{--lockup-width:112px;gap:1px}
  .member-top .member-brand .acalon-slogan{font-size:14px;line-height:1.05;margin:1px 0 0 calc(var(--lockup-width) * .4123)}
  .member-top-tools{gap:6px}
  .member-top-tools>.badge{font-size:9px;padding:5px}
  .member-top .btn{min-height:44px;padding:8px 10px;font-size:11px;gap:6px}
  .member-top .btn svg{width:16px;height:16px}
}
@media(max-width:360px){
  .member-top{padding-left:10px;padding-right:10px;gap:6px}
  .member-top .member-brand{--lockup-width:102px}
  .member-top .member-brand .acalon-slogan{font-size:13px}
}

/* Mobile actions get their own compact row: no court/finish button is covered,
   even when draft actions wrap or labels use the largest text setting. */
@media(max-width:700px){
  html.acalon-frame[data-kyoto-season] .workspace{padding-bottom:calc(var(--app-bar-content-height) + env(safe-area-inset-bottom,0px))}
  html.acalon-frame[data-kyoto-season] .workspace>main,
  html.acalon-frame[data-kyoto-season] .workspace:has(.action-dock)>main,
  html.acalon-frame[data-kyoto-season] .workspace:has(.dock-pill.has-draft)>main{padding-bottom:24px;scroll-padding-block:16px 24px}
  html.acalon-frame[data-kyoto-season] .workspace>.action-dock.dock-pill{
    position:relative;flex:0 0 auto;align-self:flex-end;left:auto;right:auto;bottom:auto;
    margin:6px 12px 8px;max-width:calc(100% - 24px);
  }
  html.acalon-frame[data-kyoto-season] .workspace>.action-dock.dock-pill-simple{max-width:48vw}
  #sheet{max-height:min(85dvh,calc(var(--mobile-viewport-height,100dvh) - 16px));bottom:var(--mobile-keyboard-inset,0px)}
  /* Hold the visible top while the keyboard animates; only the body shrinks.
     Native dialog auto-centering and bottom compensation must not both apply. */
  #sheet[data-input-active]{position:fixed;top:var(--mobile-sheet-top);bottom:auto;margin-block:0;height:var(--mobile-sheet-height);max-height:var(--mobile-sheet-height)}
  #sheet .sheet-header{flex:0 0 auto}
  #sheet .sheet-header .icon-btn{width:44px;height:44px;min-width:44px}
  #sheet .sheet-body{flex:1 1 auto;min-height:0;scroll-padding-block:16px 40px;overflow-anchor:none;scroll-behavior:auto;-webkit-overflow-scrolling:touch}
  #sheet :is(input,select,textarea){scroll-margin-block:16px}
  /* Reclaim the subtitle/safe-area space while typing; the close/save controls
     remain visible and only sheet-body may scroll. */
  #sheet[data-keyboard-open]{padding-bottom:0}
  #sheet[data-keyboard-open] .sheet-header{padding:12px 16px 10px}
  #sheet[data-keyboard-open] .sheet-header::before{display:none}
  #sheet[data-keyboard-open] .sheet-header p{display:none}
  html.acalon-frame :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),select,textarea){font-size:max(16px,calc(16px * var(--font-scale,1)))}
  .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .form-grid>*,.form-field{min-width:0}
  .form-field :is(input,select,textarea){min-width:0;max-width:100%;box-sizing:border-box}
  #sheet .inline-error .btn{min-height:44px;margin-top:10px;white-space:normal}
}
.conflict-review{margin-bottom:18px;overflow-wrap:anywhere}
.conflict-review>div{width:100%;min-width:0}
.conflict-review p{margin:8px 0;line-height:1.6}
.conflict-review :is(th,td){white-space:normal;overflow-wrap:anywhere}

/* The cup and generate controls need a little more room before NEXT exists. */
/* Keep the cup beside the next-round action, including large text on phones. */
html[data-kyoto-season] .action-dock.dock-pill-simple.has-order{max-width:min(calc(100vw - var(--sidebar,0px) - 40px),340px)}
html[data-kyoto-season] .action-dock.dock-pill-simple.has-order .dock-actions{width:auto;flex-wrap:nowrap}
html[data-kyoto-season] .action-dock.dock-pill-simple.has-order .dock-actions .btn{width:auto;min-width:0;flex:0 1 auto}
@media(max-width:700px){html.acalon-frame[data-kyoto-season] .workspace>.action-dock.dock-pill-simple.has-order{max-width:min(calc(100vw - 24px),340px)}}

/* Full artwork is requested only when its matching background is selected. */
:root[data-page-background="sakura"]{--app-wallpaper:url('/backgrounds/sakura-v1.webp')}
:root[data-page-background="ancient-japan"]{--app-wallpaper:url('/backgrounds/ancient-japan-v1.webp')}
:root[data-page-background="lantern-street"]{--app-wallpaper:url('/backgrounds/lantern-street-v1.webp')}
:root[data-page-background="badminton"]{--app-wallpaper:url('/backgrounds/badminton-v1.webp')}
:root[data-page-background="lucky-blossoms"]{--app-wallpaper:url('/backgrounds/lucky-blossoms-v1.webp')}
:root[data-page-background="chill-chibi"]{--app-wallpaper:url('/backgrounds/chill-chibi-v1.webp')}
:root[data-page-background="bi-bo"]{--app-wallpaper:url('/backgrounds/bi-bo-v1.webp')}
html[data-page-background]:not([data-page-background="default"]) .workspace::before,
html[data-page-background]:not([data-page-background="default"]) :is(.member-shell,.live-shell){
  background-color:#fffaf2;
  background-image:var(--app-wallpaper);
  background-position:center bottom;
  background-size:auto 100%;
  background-repeat:no-repeat;
}
.page-background-settings{min-width:0;margin:13px 0 0;padding:16px 0 0;border:0;border-top:1px solid #e2e6dc}
.page-background-settings legend{padding:0 0 8px;font-size:calc(14px * var(--font-scale,1));font-weight:750;color:#254a36}
.page-background-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:12px}
.page-background-option{position:relative;display:flex;flex-direction:column;min-width:0;overflow:hidden;border:1px solid #dce4d6;border-radius:12px;background:#fff;color:#254a36;cursor:pointer}
.page-background-preview{position:relative;display:block;min-width:0;height:112px;overflow:hidden;background:#fffaf2}
.page-background-preview img{display:block;width:100%;height:100%;object-fit:cover;object-position:center 82%}
.page-background-preview.is-default{background:linear-gradient(150deg,#fafbf4,#e4edde 68%,#f5e6d0)}
.page-background-name{padding:9px 10px;line-height:1.45;font-size:calc(12px * var(--font-scale,1));font-weight:700}
.page-background-check{position:absolute;top:7px;right:7px;display:none;place-items:center;width:24px;height:24px;border-radius:50%;background:#286c50;color:#fff;font-size:15px;font-weight:800;box-shadow:0 1px 5px #17372d25}
.page-background-option:has(input:checked){border-color:#3f805e;box-shadow:inset 0 0 0 1px #3f805e}
.page-background-option input:checked+.page-background-preview .page-background-check{display:grid}
.page-background-option:has(input:focus-visible){outline:2px solid #327b5a;outline-offset:3px}
@media(max-width:700px){html[data-page-background]:not([data-page-background="default"]) .workspace::before,html[data-page-background]:not([data-page-background="default"]) :is(.member-shell,.live-shell){background-size:cover}}
@media(min-width:900px){.page-background-options{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* Draft actions stay directly reachable; the pill hugs its contents. */
html[data-kyoto-season] .action-dock.dock-pill.has-draft .dock-actions{
  display:flex;width:auto;justify-content:center;flex-wrap:wrap;gap:4px;
}
html[data-kyoto-season] .action-dock.dock-pill.has-draft .dock-actions .btn{
  flex:0 1 auto;min-width:44px;min-height:44px;padding:10px 8px;gap:4px;
}
@media(max-width:700px){
  html.acalon-frame[data-kyoto-season] .workspace>.action-dock.dock-pill.has-draft{
    width:max-content;max-width:calc(100% - 24px);
  }
  html[data-kyoto-season] .action-dock.dock-pill.has-draft .dock-actions{gap:3px}
  html[data-kyoto-season] .action-dock.dock-pill.has-draft .dock-actions .btn{
    padding:10px 4px;gap:3px;white-space:nowrap;
  }
}
@media(max-width:360px){
  .action-dock.has-draft .draft-save span{display:none}
  html[data-kyoto-season] .action-dock.dock-pill.has-draft .dock-actions .draft-save{width:44px;flex:0 0 44px}
}

/* Four small, shared texture tiles; each palette tints the same material.
   Frame and wallpaper variables are separate so either can be changed alone. */
:root[data-leather-texture="grain"],[data-leather-sample="grain"]{--leather-frame-image:url('/materials/leather-grain-v1.webp')}
:root[data-leather-texture="tanned"],[data-leather-sample="tanned"]{--leather-frame-image:url('/materials/leather-tanned-v1.webp')}
:root[data-leather-texture="pu"],[data-leather-sample="pu"]{--leather-frame-image:url('/materials/leather-pu-v1.webp')}
:root[data-leather-texture="croc"],[data-leather-sample="croc"]{--leather-frame-image:url('/materials/leather-croc-v1.webp')}
:root[data-leather-color="gray"],[data-leather-swatch="gray"]{--leather-paper:#4f585f}
:root[data-leather-color="brown"],[data-leather-swatch="brown"]{--leather-paper:#684833}
:root[data-leather-color="black"],[data-leather-swatch="black"]{--leather-paper:#242629}
:root[data-leather-color="terracotta"],[data-leather-swatch="terracotta"]{--leather-paper:#89492f}
:root[data-leather-color="beige"],[data-leather-swatch="beige"]{--leather-paper:#d9c7a5}
:root[data-leather-color="yellow"],[data-leather-swatch="yellow"]{--leather-paper:#ebd89a}
:root[data-leather-color="milk"],[data-leather-swatch="milk"]{--leather-paper:#f2ece0}
:root[data-kyoto-season="leather"]{
  --season-paper:var(--leather-paper,#684833);--season-edge:#8c796055;
  --season-top:var(--leather-frame-image);--season-bottom:var(--leather-frame-image);
  --bar-ink:#493e31;--bar-muted:#514536;--bar-active:#fffaf2;--bar-active-ink:#493e31;
}
:root[data-kyoto-season="leather"][data-leather-contrast="dark"]{
  --season-edge:#f6e7bf55;--bar-ink:#fff8ed;--bar-muted:#fff8ed;
  --bar-active:#f6e7bf;--bar-active-ink:#3b3026;
}
/* The dock exclusion must not raise specificity for every bar in :is();
   the shared header fade below needs to override these artwork defaults. */
html[data-kyoto-season="leather"].acalon-frame .topbar,
html[data-kyoto-season="leather"] :is(.member-top,.live-top,.system-top,.mobile-nav,.member-nav,.action-dock:where(:not(.dock-pill))){
  background-position:left top;background-repeat:repeat;background-size:384px 384px;background-blend-mode:soft-light;
}
/* Paint the same texture in the existing inset overlay when iOS exposes that
   area to web content; native status-bar-only regions still use a solid colour. */
html[data-kyoto-season="leather"] .member-top::before{
  background-color:var(--season-paper);background-image:var(--season-top);
  background-position:left top;background-repeat:repeat;background-size:384px 384px;background-blend-mode:soft-light;
}
html[data-kyoto-season="leather"][data-leather-contrast="dark"] :is(.topbar,.member-top,.live-top,.system-top) .acalon-wordmark{content:url('/acalon-wordmark-dark.svg?v=acalon-382');filter:none}
html[data-kyoto-season="leather"] :is(.topbar,.member-top,.live-top,.system-top) .acalon-slogan{color:#59482f}
html[data-kyoto-season="leather"] :is(.topbar,.member-top,.live-top,.system-top) .slogan-finish{color:#79523a}
html[data-kyoto-season="leather"][data-leather-contrast="dark"] :is(.topbar,.member-top,.live-top,.system-top) .acalon-slogan{color:#fff8ed}
html[data-kyoto-season="leather"][data-leather-contrast="dark"] :is(.topbar,.member-top,.live-top,.system-top) .slogan-finish{color:#ffe3b1}
html[data-kyoto-season="leather"][data-leather-contrast="dark"] .topbar .top-demo .dot{background:#f6e7bf}
html[data-kyoto-season="leather"][data-leather-contrast="dark"] .system-top .btn.ghost{background:#fffaf2;color:#493e31}

.leather-controls{display:grid;gap:16px;border-top:1px solid #e2e6dc;padding-top:14px;margin-top:5px;min-width:0}
[data-leather-controls][hidden]{display:none}
.leather-choice-group{margin:0;padding:0;border:0;min-width:0}
.leather-choice-group legend{padding:0 0 9px;font-size:calc(14px * var(--font-scale,1));font-weight:750;color:#254a36}
.leather-texture-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.leather-texture-option{position:relative;display:flex;flex-direction:column;min-width:0;overflow:hidden;border:1px solid #dce4d6;border-radius:11px;background:#fff;color:#254a36;cursor:pointer}
.leather-texture-preview{display:block;position:relative;height:52px;background-color:#a8a5a0;background-image:var(--leather-frame-image);background-size:240px 240px;background-repeat:repeat;background-blend-mode:soft-light}
.leather-texture-name{padding:8px;line-height:1.4;font-size:calc(12px * var(--font-scale,1));font-weight:700}
.leather-choice-check{display:none;place-items:center;width:20px;height:20px;border-radius:50%;background:#fff;color:#254a36;font-size:13px;font-weight:800;box-shadow:0 1px 3px #253d3033}
.leather-texture-preview .leather-choice-check{position:absolute;top:6px;right:6px}
.leather-texture-option input:checked+.leather-texture-preview .leather-choice-check,
.leather-color-option input:checked+.leather-color-chip .leather-choice-check{display:grid}
.leather-texture-option:has(input:checked){border-color:#3f805e;box-shadow:inset 0 0 0 1px #3f805e}
.leather-color-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.leather-color-option{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:6px;min-width:0;min-height:64px;padding:7px 3px;border:1px solid transparent;border-radius:11px;color:#365440;cursor:pointer;font-size:calc(11px * var(--font-scale,1));line-height:1.4;text-align:center}
.leather-color-chip{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:50%;background:var(--leather-paper);border:1px solid #645c4933}
.leather-color-option:has(input:checked){background:#edf4e8;border-color:#3f805e;font-weight:750}
.leather-texture-option:has(input:focus-visible),.leather-color-option:has(input:focus-visible){outline:2px solid #327b5a;outline-offset:2px}
@media(min-width:600px){.leather-texture-options{grid-template-columns:repeat(4,minmax(0,1fr))}.leather-color-options{grid-template-columns:repeat(7,minmax(0,1fr))}}

:root[data-page-background="leather-grain"],[data-leather-wallpaper="leather-grain"]{--leather-wallpaper-image:url('/materials/leather-grain-v1.webp');--leather-wallpaper-paper:#e8dbc8}
:root[data-page-background="leather-tanned"],[data-leather-wallpaper="leather-tanned"]{--leather-wallpaper-image:url('/materials/leather-tanned-v1.webp');--leather-wallpaper-paper:#ecdbc6}
:root[data-page-background="leather-pu"],[data-leather-wallpaper="leather-pu"]{--leather-wallpaper-image:url('/materials/leather-pu-v1.webp');--leather-wallpaper-paper:#eee9df}
:root[data-page-background="leather-croc"],[data-leather-wallpaper="leather-croc"]{--leather-wallpaper-image:url('/materials/leather-croc-v1.webp');--leather-wallpaper-paper:#ddded8}
html:root[data-page-background^="leather-"] .workspace::before,
html:root[data-page-background^="leather-"] :is(.member-shell,.live-shell),
.page-background-preview[data-leather-wallpaper]{
  background-color:var(--leather-wallpaper-paper);background-image:var(--leather-wallpaper-image);
  background-position:left top;background-size:384px 384px;background-repeat:repeat;background-blend-mode:soft-light;
}
/* Softer material colours need a stronger caption ink outside the white panels. */
:root[data-page-background^="leather-"]{--muted:#4f5b47}
.page-background-preview[data-leather-wallpaper]{background-size:240px 240px}

/* Đông Sơn collection: one shared relief image, three opaque bar palettes.
   Wallpaper artwork is separate and downloaded only when selected. */
:root[data-kyoto-season="dong-son-bronze"]{--season-paper:#593e2b;--season-edge:#a88858;--bar-active:#f5dfa4;--bar-active-ink:#3e2d1d}
:root[data-kyoto-season="dong-son-jade"]{--season-paper:#194c45;--season-edge:#6e9c86;--bar-active:#dcebc2;--bar-active-ink:#163d35}
:root[data-kyoto-season="dong-son-indigo"]{--season-paper:#29374f;--season-edge:#79869c;--bar-active:#f3dfa7;--bar-active-ink:#273349}
:root[data-kyoto-season^="dong-son-"]{
  --season-top:url('/materials/dong-son-relief-v1.webp');--season-bottom:var(--season-top);
  --bar-ink:#fff9eb;--bar-muted:#f4eddc;
}
html[data-kyoto-season^="dong-son-"].acalon-frame .topbar,
html[data-kyoto-season^="dong-son-"] :is(.member-top,.live-top,.system-top,.mobile-nav,.member-nav,.action-dock:where(:not(.dock-pill))){
  background-size:cover;background-position:center 54%;background-repeat:no-repeat;background-blend-mode:soft-light;
}
html[data-kyoto-season^="dong-son-"] :is(.mobile-nav,.member-nav){background-position:center 68%}
html[data-kyoto-season^="dong-son-"] .member-top::before{
  background-color:var(--season-paper);background-image:var(--season-top);background-size:cover;background-position:center 54%;background-blend-mode:soft-light;
}
html[data-kyoto-season^="dong-son-"] :is(.topbar,.member-top,.live-top,.system-top) .acalon-wordmark{content:url('/acalon-wordmark-dark.svg?v=acalon-382');filter:none}
html[data-kyoto-season^="dong-son-"] :is(.topbar,.member-top,.live-top,.system-top) .acalon-slogan{color:#fff7df}
html[data-kyoto-season^="dong-son-"] :is(.topbar,.member-top,.live-top,.system-top) .slogan-finish{color:#f4d497}
html[data-kyoto-season^="dong-son-"] .topbar .top-demo .dot{background:#f4d497}
html[data-kyoto-season^="dong-son-"] .system-top .btn.ghost{background:#fff9ed;color:#254538}
:root[data-page-background="dong-son-bronze"]{--app-wallpaper:url('/backgrounds/dong-son-bronze-v1.webp')}
:root[data-page-background="dong-son-jade"]{--app-wallpaper:url('/backgrounds/dong-son-jade-v1.webp')}
:root[data-page-background="dong-son-indigo"]{--app-wallpaper:url('/backgrounds/dong-son-indigo-v1.webp')}
:root[data-page-background^="dong-son-"]{--muted:#536154}
.page-background-collection{border-top:1px solid #e2e6dc;padding-top:16px;margin-top:16px}
.page-background-collection-title{margin:0 0 12px;font-size:calc(14px * var(--font-scale,1));line-height:1.5;color:#254a36}

/* Match the solid system colour at the top edge, then reveal the artwork.
   This affects only header backgrounds; content and touch targets stay opaque.
   Keep each image's original sizing and blending on its own background layer. */
:root[data-kyoto-season]{
  --header-art-size:auto 100%;--header-art-position:right center;
  --header-art-repeat:no-repeat;--header-art-blend:normal;
  --header-art-fade:linear-gradient(to bottom,var(--season-paper) 0px,var(--season-paper) calc(env(safe-area-inset-top,0px) + 3px),transparent calc(env(safe-area-inset-top,0px) + 34px));
}
:root[data-kyoto-season="leather"]{--header-art-size:384px 384px;--header-art-position:left top;--header-art-repeat:repeat;--header-art-blend:soft-light}
:root[data-kyoto-season^="dong-son-"]{--header-art-size:cover;--header-art-position:center 54%;--header-art-blend:soft-light}
html[data-kyoto-season].acalon-frame .topbar,
html[data-kyoto-season] :is(.member-top,.live-top,.system-top){
  background-image:var(--header-art-fade),var(--season-top);
  background-size:100% 100%,var(--header-art-size);
  background-position:left top,var(--header-art-position);
  background-repeat:no-repeat,var(--header-art-repeat);
  background-blend-mode:normal,var(--header-art-blend);
}
/* The inset, where exposed by iOS, joins the native solid-colour status area. */
html[data-kyoto-season] .member-top::before{background:var(--season-paper)}
