/* Shared finishing layer: legible type, generous touch controls, calm motion. */
:root{--muted:#655f4e;--focus:#155a9b;--shadow:0 4px 0 #302b2010,0 10px 24px #302b2008}
html{scroll-padding-top:80px}
body{line-height:1.55;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
[hidden]{display:none!important}
button,a,summary{-webkit-tap-highlight-color:transparent}
button{font-family:inherit;cursor:pointer}
button:disabled{cursor:default}
:where(a,button,select,input,summary,[tabindex]):focus-visible{outline:3px solid var(--focus);outline-offset:4px}
.skip-link{position:fixed;top:8px;left:12px;z-index:200;transform:translateY(-160%);padding:10px 18px;background:var(--ink);color:white!important;border-radius:10px;font-weight:800}
.skip-link:focus{transform:none}
header .lang-button,header .rulebook-help-button,.rulebook-dialog-close{min-width:44px;min-height:44px;height:44px}
header .lang-menu{top:50px;min-width:160px;padding:6px;box-shadow:0 12px 32px #17161222}
.lang-menu button{min-height:44px;border-radius:6px}
.lang-menu button:hover{background:#f2efdb}
.back{min-height:44px;display:inline-flex;align-items:center;gap:6px;padding:6px 0}
.mode-card,.puzzle-card,.button,.social-links a{transition:transform .18s ease,box-shadow .18s ease,background .18s ease}
.mode-card,.puzzle-card{border-width:1.5px}
.mode-card b{line-height:1.25}
.mode-card em{margin-top:4px;line-height:1.5}
.mode-card .mode-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:#efe9b8;color:#4e482b}
.mode-card:active,.button:active,.social-links a:active{transform:translateY(1px)}
.page,.detail{padding-bottom:max(48px,env(safe-area-inset-bottom))}
.page-load-error{margin:12px 0;padding:18px;border:1px solid #b48c69;border-radius:14px;background:#fff9ed;text-align:center;line-height:1.65}
.page-load-error p{margin:0 0 12px}
.storage-notice{position:fixed;left:16px;right:16px;bottom:max(12px,env(safe-area-inset-bottom));z-index:100;margin:0 auto;max-width:560px;padding:14px 18px;border-radius:12px;background:#302d23;color:#fff;box-shadow:0 8px 30px #0003;font-size:.85rem;line-height:1.6}
.rulebook-retry{display:block;margin:12px auto;min-height:44px}
.about-card{margin-inline:auto}
.about-card p{max-width:65ch}
.about-contact a{min-height:44px;display:flex;align-items:center}
.social-links a{min-height:48px}
.daily-calendar-card{width:100%;min-width:0}
.daily-month-nav{grid-template-columns:44px minmax(110px,1fr) 44px}
.daily-month-nav button{width:44px;height:44px}
.daily-day{min-height:44px;aspect-ratio:auto;height:clamp(48px,7vw,76px)}
.daily-weekdays span{font-size:.8rem}
.daily-legend{font-size:.8rem;line-height:1.5}
.daily-loading-state{min-height:220px}
.daily-puzzle-image:empty{display:none}
.star-picker button{border-radius:12px;transition:transform .15s ease}
.star-picker button:active{transform:scale(.93)}
.online-demo .online-instruction{line-height:1.6;text-wrap:balance}
.online-demo .demo-footer{padding-inline:16px;line-height:1.75}
.online-demo .online-game{padding-bottom:max(12px,env(safe-area-inset-bottom))}
@media(hover:hover) and (pointer:fine){
  .mode-card:hover,.puzzle-card:hover{transform:translateY(-3px);box-shadow:0 8px 0 #302b200c,0 16px 28px #302b2012}
  .button:hover,.social-links a:hover{box-shadow:0 5px 14px #302b2022}
}
@media(min-width:1000px){
  .daily-layout{grid-template-columns:minmax(0,1.25fr) minmax(300px,.85fr);gap:24px}
  .daily-calendar-card{position:sticky;top:88px;padding:20px}
  .daily-calendar-heading{align-items:stretch;flex-direction:column}
  .daily-feature-card{padding:18px}
}
@media(max-width:420px){
  header{gap:8px;padding-left:12px;padding-right:12px}
  .brand{gap:7px}.brand b{font-size:1rem}
  .daily-calendar-card{padding:10px}
  .daily-calendar-grid,.daily-weekdays{gap:4px}
  .daily-day{min-height:44px}
  .daily-day b{font-size:.8rem;left:5px}
  .daily-day .day-stars{font-size:.6rem;right:3px}
  .page{padding-top:22px}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}
