/* 2026 visual system upgrade: clearer hierarchy, safer touch targets, and focused motion. */
:root{
  --paper:#f7f3e9;
  --surface:#fffdf8;
  --ink:#132832;
  --muted:#697577;
  --red:#e34a37;
  --red-dark:#bd3024;
  --blue:#134f66;
  --gold:#d8a83d;
  --line:rgba(19,40,50,.12);
  --shadow-soft:0 8px 28px rgba(18,39,48,.09);
  --shadow-pop:0 15px 38px rgba(18,39,48,.16);
}

html{background:var(--paper)}
body{min-width:0;color:var(--ink);background:linear-gradient(180deg,#fbf8f0 0,var(--paper) 28rem)}
button{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid rgba(227,74,55,.35);outline-offset:3px}
.app-launch{position:fixed;z-index:1000;inset:0;display:grid;place-content:center;justify-items:center;overflow:hidden;background:#f8f4ea;color:#172b34;transition:opacity .38s ease,visibility .38s ease}.app-launch.leaving{opacity:0;visibility:hidden}.app-launch-glow{position:absolute;width:min(115vw,680px);aspect-ratio:1;border-radius:50%;background:radial-gradient(circle,rgba(227,68,55,.15),rgba(244,196,94,.08) 40%,transparent 68%);transform:translateY(-5%);animation:launchGlow 1.5s ease-in-out infinite alternate}.app-launch-lockup{position:relative;display:flex;align-items:center;gap:15px;animation:launchLockup .62s cubic-bezier(.2,.8,.2,1) both}.app-launch-mark{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:76px;height:76px;padding-top:3px;border-radius:23px 20px 25px 19px;background:linear-gradient(145deg,#ef5142,#c92f28);color:#fff;font:900 28px Arial,Helvetica,sans-serif;letter-spacing:-1.5px;box-shadow:0 17px 34px rgba(191,48,40,.26);transform:rotate(-5deg)}.app-launch-lockup strong,.app-launch-lockup small{display:block}.app-launch-lockup strong{font:900 34px 'DM Sans',sans-serif;letter-spacing:-.055em}.app-launch-lockup small{margin-top:2px;color:#b33b31;font:800 7px 'DM Sans',sans-serif;letter-spacing:.18em}.app-launch>p{position:relative;margin:25px 0 20px;text-align:center;font-size:14px;font-weight:800;line-height:1.65;letter-spacing:.04em;animation:launchCopy .5s .16s ease both}.app-launch-progress{position:relative;width:112px;height:4px;overflow:hidden;border-radius:999px;background:rgba(23,43,52,.1)}.app-launch-progress i{display:block;width:46%;height:100%;border-radius:inherit;background:linear-gradient(90deg,#df4035,#f4bd4e);animation:launchProgress .8s ease-in-out infinite}@keyframes launchLockup{from{opacity:0;transform:translateY(14px) scale(.94)}}@keyframes launchCopy{from{opacity:0;transform:translateY(8px)}}@keyframes launchGlow{to{transform:translateY(-5%) scale(1.07)}}@keyframes launchProgress{from{transform:translateX(-105%)}to{transform:translateX(230%)}}
@media (orientation:landscape) and (max-height:560px){.app-launch-lockup{transform:scale(.86)}.app-launch>p{margin:15px 0 13px;font-size:11px}.app-launch-mark{width:62px;height:62px;border-radius:19px;font-size:23px}.app-launch-lockup strong{font-size:29px}}
@media (prefers-reduced-motion:reduce){.app-launch-glow,.app-launch-lockup,.app-launch>p,.app-launch-progress i{animation:none}}

/* Header */
.topbar{
  border-bottom-color:rgba(19,40,50,.08);
  background:rgba(247,243,233,.91);
  box-shadow:0 5px 22px rgba(19,40,50,.045);
}
.brand{min-height:44px;padding:4px 2px;font-size:19px;letter-spacing:-.03em}
.brand-mark{
  width:36px;height:36px;border-radius:12px;
  background:linear-gradient(145deg,#f05b43,var(--red-dark));
  box-shadow:0 6px 14px rgba(227,74,55,.26);
  transform:rotate(-4deg);
}
.time-pill{min-height:43px;padding:5px 11px;border-color:rgba(227,74,55,.13);box-shadow:0 4px 13px rgba(19,40,50,.05)}
.battle-day{font-size:8px;letter-spacing:.1em}
.battle-time-row{gap:6px;font-size:10px}
.time-pill strong{font-size:12px;font-variant-numeric:tabular-nums}
.live-dot{width:7px;height:7px;animation:livePulse 1.8s ease-out infinite}
.avatar-button{width:40px;height:40px;min-width:40px;flex-basis:40px;border:2px solid rgba(255,255,255,.88);box-shadow:0 4px 13px rgba(19,40,50,.18);transition:transform .18s ease,box-shadow .18s ease}
.avatar-button:active{transform:scale(.92)}

/* Shared typography and surfaces */
.screen{padding-left:clamp(16px,4vw,28px);padding-right:clamp(16px,4vw,28px);animation:screenLift .38s cubic-bezier(.2,.75,.25,1)}
.compact-screen-title{padding:5px 2px 19px}
.compact-screen-title p,.eyebrow{font-size:10px;letter-spacing:.15em}
.compact-screen-title h1{font-size:clamp(25px,6vw,34px);line-height:1.22;letter-spacing:-.055em;text-wrap:balance}
.section-title h2{font-size:21px;letter-spacing:-.035em}
.section-title>span{font-size:11px}
.primary-button,.secondary-button,.danger-button{min-height:54px;border-radius:16px;font-size:13px;transition:transform .16s ease,filter .16s ease,box-shadow .16s ease}
.primary-button{background:linear-gradient(135deg,#ef5944,var(--red-dark));box-shadow:0 11px 25px rgba(227,74,55,.27)}
.primary-button:active,.secondary-button:active,.danger-button:active{transform:scale(.98);filter:saturate(1.12)}
.text-button,.light-button,.logout-button,.icon-button{min-height:44px;min-width:44px}

/* Bottom navigation: the current destination is immediately visible. */
.bottom-nav{padding-left:8px;padding-right:8px;border-top-color:rgba(19,40,50,.08);box-shadow:0 -7px 26px rgba(19,40,50,.07)}
.bottom-nav button{position:relative;min-width:0;min-height:56px;border-radius:15px;gap:1px;font-size:11px;font-weight:700;transition:color .18s ease,background .18s ease,transform .15s ease}
.bottom-nav button span{height:25px;font-size:21px;transition:transform .22s cubic-bezier(.2,.9,.2,1.25)}
.bottom-nav button.active:not(.post-nav){color:var(--red);background:linear-gradient(180deg,rgba(227,74,55,.1),rgba(227,74,55,.025))}
.bottom-nav button.active:not(.post-nav):after{content:"";position:absolute;top:-8px;left:29%;right:29%;height:3px;border-radius:99px;background:var(--red);box-shadow:0 2px 8px rgba(227,74,55,.35)}
.bottom-nav button.active span{transform:translateY(-1px) scale(1.07)}
.bottom-nav .post-nav span{width:46px;height:46px;margin-top:-22px;background:linear-gradient(145deg,#f35c46,var(--red-dark));box-shadow:0 9px 23px rgba(227,74,55,.38)}
.bottom-nav .post-nav.active{color:var(--red)}
.bottom-nav .post-nav.active span{box-shadow:0 0 0 5px rgba(227,74,55,.12),0 10px 25px rgba(227,74,55,.42)}

/* Sort controls */
.sort-tabs,.viewer-sort{gap:7px;scroll-snap-type:x proximity}
.sort-tabs button,.viewer-sort button{min-height:42px;padding:9px 15px;border-color:rgba(19,40,50,.13);font-size:12px;scroll-snap-align:start;transition:transform .16s ease,background .18s ease,color .18s ease,box-shadow .18s ease}
.sort-tabs button.active{background:linear-gradient(135deg,#173845,var(--ink));box-shadow:0 6px 15px rgba(19,40,50,.16)}
.sort-tabs button:active,.viewer-sort button:active{transform:scale(.95)}

/* Vote grid */
.map-toolbar{padding:2px 2px 17px;gap:10px}
.map-toolbar>div:first-child{padding:7px 10px;border-radius:12px;background:rgba(255,255,255,.65)}
.map-toolbar strong{font-size:23px;color:var(--blue)}
.map-toolbar span{font-size:11px}
.map-medal-key{padding:7px 9px;border-radius:12px;background:#fff;box-shadow:0 4px 14px rgba(19,40,50,.05)}
.map-medal-key span{font-size:9px}
.prefecture-momentum{display:block;width:100%;margin:0 0 12px;padding:13px 15px;border:1px solid rgba(19,79,102,.1);border-radius:17px;background:linear-gradient(135deg,#fffdf8,#e8f2ef);box-shadow:0 5px 16px rgba(19,40,50,.05);color:var(--ink);text-align:left;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease}
.prefecture-momentum:active{transform:scale(.985);box-shadow:0 2px 9px rgba(19,40,50,.07)}
.momentum-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.prefecture-momentum span{color:var(--muted);font-size:9px;font-weight:700}
.prefecture-momentum strong{color:var(--blue);font-size:13px}
.prefecture-momentum .momentum-copy{display:block;margin:5px 0 9px;color:var(--ink);font-size:11px;font-weight:800}
.momentum-track{display:block;height:5px;overflow:hidden;border-radius:99px;background:rgba(19,79,102,.1)}
.momentum-track i{display:block;width:20%;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--red),#efb84d);transition:width .35s ease}
.guest-guide{margin:0 0 12px;padding:13px 13px 13px 15px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-radius:16px;background:var(--blue);color:#fff;box-shadow:0 8px 20px rgba(19,79,102,.2);animation:itemRise .35s both}
.guest-guide[hidden]{display:none}.guest-guide strong,.guest-guide span{display:block}.guest-guide strong{font-size:12px}.guest-guide span{margin-top:3px;color:rgba(255,255,255,.7);font-size:9px}.guest-guide button{flex:0 0 auto;width:38px;height:38px;border:0;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;font-size:17px}
.japan-map{gap:7px;padding:10px;border-radius:22px;background:linear-gradient(145deg,#dbeae5,#eef3ed);box-shadow:inset 0 0 0 1px rgba(19,79,102,.06)}
.pref-tile{border-radius:13px;background:#c5d8d3;box-shadow:0 5px 13px rgba(19,59,70,.14);transition:transform .2s cubic-bezier(.2,.85,.25,1.2),box-shadow .2s ease,filter .2s ease}
.pref-tile:after{inset:30% 0 0;background:linear-gradient(transparent,rgba(6,24,31,.86))}
.pref-tile span{left:7px;bottom:7px;font-weight:800}
.pref-tile b{right:6px;top:6px;min-height:20px;padding:5px 7px}
.pref-tile:not(.no-post):active{transform:scale(.94)!important;filter:saturate(1.14)}
.national-tile{box-shadow:0 11px 25px rgba(19,79,102,.29)}
.national-tile:before{content:"NO.1";position:absolute;z-index:3;left:8px;top:8px;padding:5px 8px;border-radius:99px;background:linear-gradient(135deg,#f5ca66,#b67c19);color:#fff;font:800 9px 'DM Sans';letter-spacing:.08em;box-shadow:0 4px 10px rgba(90,57,8,.25)}
.pref-tile.rank-1{animation:winnerHalo 2.8s ease-in-out infinite}
.map-likes-button{min-height:44px;padding:8px 5px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:1px solid rgba(227,74,55,.26);background:radial-gradient(circle at 80% 10%,rgba(255,187,149,.38),transparent 36%),linear-gradient(145deg,#fffaf7,#fff0ea);box-shadow:0 7px 18px rgba(227,74,55,.12);transition:transform .16s ease,background .16s ease,box-shadow .16s ease}
.map-likes-button .map-likes-icon{height:auto;font-size:clamp(22px,5vw,34px);line-height:.9}
.map-likes-button strong{font-size:clamp(8px,2.2vw,11px);line-height:1.2;white-space:nowrap}
.map-likes-button small{color:var(--muted);font:700 clamp(7px,1.8vw,9px) 'DM Sans';white-space:nowrap}
.map-likes-button small i{margin-left:2px;color:var(--red);font-style:normal}
.map-likes-button:hover{background:linear-gradient(145deg,#fff,#ffe8df);box-shadow:0 9px 21px rgba(227,74,55,.18)}
.map-likes-button:active{transform:scale(.94)}

/* Feed and advertising */
.fans-title-row{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
.fans-title-row>div:first-child{min-width:0}
.fan-feed-controls{display:block;margin-bottom:3px}
.fan-feed-count{min-height:42px;display:flex;align-items:center;flex:0 0 auto;padding:0 10px;border-radius:12px;background:rgba(255,255,255,.68);font-size:10px;white-space:nowrap;box-shadow:0 4px 14px rgba(19,40,50,.05)}
.fan-feed-count strong{font-size:14px}
.ranking-list{gap:14px}
.ranking-card{min-height:104px;border:1px solid rgba(19,40,50,.055);border-radius:20px;box-shadow:var(--shadow-soft);transition:transform .18s ease,box-shadow .18s ease}
.ranking-card h3{font-size:14px}.ranking-card p{font-size:11px}.ranking-card strong{font-size:14px}
.ranking-card:active{transform:scale(.975);box-shadow:0 4px 13px rgba(18,39,48,.08)}
.fan-avatar{width:34px;height:34px;font-size:12px;box-shadow:0 4px 10px rgba(19,79,102,.2)}
.fan-card time{font-size:10px}
.inline-ad{min-height:116px;border-radius:20px;box-shadow:0 6px 20px rgba(19,40,50,.06)}
.inline-ad>span{font-size:8px}.inline-ad div small{font-size:8px}.inline-ad div strong{font-size:13px}.inline-ad div p{font-size:10px}.inline-ad-link{min-height:40px;padding:9px 14px;font-size:10px}
.fan-load-more{font-size:12px;border-radius:16px}

/* Results */
.winner-card{position:relative;border:1px solid rgba(216,168,61,.28);box-shadow:0 17px 42px rgba(84,58,14,.18)}
.winner-card:before{content:"";position:absolute;z-index:2;inset:0 0 auto;height:3px;background:linear-gradient(90deg,#e34a37,#f2bd47,#48a57e,#327bc4,#9b58b5);background-size:200% 100%;animation:rainbowMove 4s linear infinite}
.winner-badge{top:16px;left:16px;padding:10px 14px;background:linear-gradient(135deg,#f4cb67,#b47a18);box-shadow:0 7px 17px rgba(99,63,7,.28);font-size:12px}
.winner-info{padding:21px}.winner-info p{font-size:12px}.winner-info h2{font-size:23px}.winner-info div{font-size:12px}.winner-info strong{font-size:20px}
.prefecture-results{margin-top:34px}
.prefecture-select{min-height:54px;padding:8px 10px 8px 16px;border-radius:17px;box-shadow:0 5px 18px rgba(19,40,50,.05)}
.prefecture-select span{font-size:11px}.prefecture-select select{min-height:40px;font-size:13px}
.selected-prefecture-result{border-radius:21px;box-shadow:var(--shadow-soft);transition:transform .18s ease}
.selected-result-copy>span{font-size:11px}.selected-result-copy h3{font-size:17px}.selected-result-copy p{font-size:10px}.selected-result-copy button{min-height:40px;margin-top:7px;font-size:11px}
.prefecture-winner-card{border-radius:18px;border:1px solid rgba(19,40,50,.05);box-shadow:var(--shadow-soft);transition:transform .18s ease,box-shadow .18s ease}
.prefecture-winner-card>div{padding:12px}.prefecture-winner-card span{font-size:10px}.prefecture-winner-card strong{font-size:13px}.prefecture-winner-card small{font-size:10px}
.prefecture-winner-card:active{transform:scale(.975)}
.all-prefecture-results{border-radius:18px;box-shadow:0 5px 18px rgba(19,40,50,.05)}
.all-prefecture-results summary{min-height:52px;font-size:12px}
.prefecture-result-item{min-height:64px;padding:10px}.prefecture-result-item strong{font-size:11px}.prefecture-result-item small{font-size:9px}

/* Profile, history, and today's post */
.profile-hero{grid-template-columns:82px minmax(0,1fr) auto;gap:16px;padding-top:11px}
.profile-avatar{width:82px;height:82px;box-shadow:0 0 0 5px #fff,0 10px 24px rgba(19,40,50,.13)}
.profile-hero h1{font-size:29px;letter-spacing:-.045em}.profile-hero p:last-child{font-size:12px}
.profile-hero h1+p{margin:3px 0 0;line-height:1.35}
.profile-actions{display:flex;flex-direction:column;align-items:flex-end;gap:4px}
.profile-actions .icon-button{min-height:32px;height:32px}
.profile-bio{max-width:280px!important;margin:3px 0 0!important;color:var(--muted)!important;font-size:10px!important;line-height:1.45!important;overflow-wrap:anywhere}
.profile-growth{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:11px;align-items:center;margin:0 0 10px;padding:13px 14px;border:1px solid rgba(240,193,105,.28);border-radius:17px;background:linear-gradient(135deg,#fff9e8,#fff);box-shadow:0 5px 16px rgba(78,54,10,.06)}
.profile-badge-mark{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:linear-gradient(145deg,#f1c862,#b77a16);color:#fff;font-size:24px;box-shadow:0 5px 13px rgba(137,89,12,.24)}
.profile-growth>div:nth-child(2){min-width:0}.profile-growth small{display:block;color:#a67217;font:800 7px 'DM Sans';letter-spacing:.12em}.profile-growth strong{display:block;margin-top:2px;font-size:12px}.profile-growth p{margin:3px 0 5px;color:var(--muted);font-size:8px}.profile-growth>b{align-self:start;padding:5px 8px;border-radius:999px;background:#fff;color:#a67217;font-size:8px;white-space:nowrap}
.profile-badge-side{align-self:stretch;display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;gap:5px}.profile-badge-side>b{padding:5px 8px;border-radius:999px;background:#fff;color:#a67217;font-size:8px;white-space:nowrap}.profile-badge-side>button{border:0;border-radius:999px;background:#173f50;color:#fff;padding:6px 10px;font-size:8px;font-weight:800;cursor:pointer}
.profile-mission-track{height:4px;overflow:hidden;border-radius:999px;background:rgba(164,111,18,.12)}.profile-mission-track i{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#e9b944,#d98a22);transition:width .3s ease}
.badge-picker-card{max-height:min(82dvh,720px);overflow:auto;padding:28px 20px 22px}.badge-picker-card h2{margin:5px 0 6px;font-size:22px}.badge-picker-card>p:not(.eyebrow){margin:0 0 18px;color:var(--muted);font-size:10px;line-height:1.6}.badge-picker-grid{display:grid;gap:15px}.badge-picker-group{display:grid;gap:7px}.badge-picker-group>header{display:flex;align-items:center;justify-content:space-between;padding:0 3px}.badge-picker-group>header strong{font-size:11px}.badge-picker-group>header span{color:var(--red);font:800 10px 'DM Sans'}.badge-picker-group>div{display:grid;gap:6px}.badge-picker-group button{width:100%;min-height:54px;display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:9px;padding:7px 9px;border:1px solid var(--line);border-radius:13px;background:#fff;text-align:left}.badge-picker-group button i{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:linear-gradient(145deg,#f1c862,#b77a16);font-style:normal;font-size:18px}.badge-picker-group button span strong,.badge-picker-group button span small{display:block}.badge-picker-group button span strong{font-size:10px}.badge-picker-group button span small{margin-top:2px;color:var(--muted);font-size:7px}.badge-picker-group button>b{padding:4px 6px;border-radius:999px;background:#e7f0ed;color:var(--blue);font-size:7px}.badge-picker-group button.selected{border-color:#d89a25;box-shadow:0 0 0 2px rgba(216,154,37,.14)}.badge-picker-group button.locked{opacity:.46;filter:grayscale(.7)}.badge-picker-group button.locked>b{background:#eee;color:#777}
.prefecture-invite-button{width:100%;min-height:54px;margin:0 0 12px;padding:10px 14px;border:1px solid rgba(19,79,102,.13);border-radius:16px;background:#e7f0ed;color:var(--ink);display:flex;align-items:center;gap:11px;text-align:left;cursor:pointer}.prefecture-invite-button>span:first-child{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--blue);color:#fff;font-size:18px}.prefecture-invite-button strong,.prefecture-invite-button small{display:block}.prefecture-invite-button strong{font-size:11px}.prefecture-invite-button small{margin-top:2px;color:var(--red);font-size:8px;font-weight:800}
.prefecture-invite-button[hidden]{display:none}
.today-status{min-height:82px;padding:19px;border-radius:22px;background:radial-gradient(circle at 92% 10%,rgba(255,205,104,.34),transparent 35%),linear-gradient(135deg,#ee5843,var(--red-dark));box-shadow:0 12px 27px rgba(227,74,55,.24)}
.today-status span{font-size:10px}.today-status strong{font-size:15px}.today-status button{min-width:44px;font-size:11px}
.stats-grid article{padding:18px;border:1px solid rgba(19,40,50,.05);border-radius:19px;box-shadow:0 6px 19px rgba(19,40,50,.055)}
.stats-grid span{font-size:10px}.stats-grid strong{font-size:30px}.stats-grid small{font-size:11px}
.history-column{padding:11px;border-radius:19px}.history-column>header strong{font-size:13px}.history-column>header small{font-size:10px}
.history-award-card{border-radius:14px;box-shadow:0 5px 16px rgba(19,40,50,.08);transition:transform .18s ease}
.history-photo span{font-size:9px}.history-card-copy{padding:9px}.history-card-copy strong{font-size:11px}.history-card-copy small{font-size:9px}.history-card-copy .history-likes{font-size:11px}
.history-delete{top:7px;right:7px;width:40px;height:40px;font-size:15px}
.history-note{font-size:10px}
.my-post-card{border-radius:25px;border:1px solid rgba(227,74,55,.1);box-shadow:var(--shadow-pop);transition:transform .18s ease}
.my-post-card:active{transform:scale(.985)}
.my-post-card>div{padding:20px}.my-post-card p{font-size:11px}.my-post-card strong{font-size:20px}.my-post-card small{font-size:11px}.my-post-badge{font-size:11px;box-shadow:0 5px 14px rgba(0,0,0,.2)}
.delete-content-button,.avatar-select-button,.avatar-delete-button,.account-lifecycle button{min-height:44px;font-size:11px}

/* Upload */
.upload-drop{border-width:2px;border-color:rgba(19,79,102,.22);box-shadow:inset 0 0 0 1px rgba(255,255,255,.7),0 8px 25px rgba(19,40,50,.05)}
.upload-drop .camera-icon{width:64px;height:64px;font-size:30px;box-shadow:0 7px 17px rgba(227,74,55,.12)}
.upload-drop strong{font-size:15px}.upload-drop small{font-size:11px;line-height:1.65}
.upload-prompt button{min-height:44px;padding:11px 20px;font-size:12px;box-shadow:0 8px 18px rgba(227,74,55,.22)}
.crop-controls{padding:16px;border-radius:18px}.crop-controls>div strong{font-size:13px}.crop-controls>div span{font-size:10px}.crop-controls label,.crop-controls button{font-size:11px;min-height:40px}
.post-title-field{display:grid;gap:7px;padding:14px 15px;border:1px solid rgba(19,79,102,.1);border-radius:16px;background:#fff;color:var(--ink);font-size:11px;font-weight:800}
.post-title-field span{display:flex;align-items:center;justify-content:space-between}.post-title-field small{color:var(--muted);font-size:8px;font-weight:600}
.post-title-field input{width:100%;height:44px;padding:0 12px;border:1px solid var(--line);border-radius:11px;background:var(--paper);color:var(--ink);font-size:13px}
.location-card{padding:18px;border-radius:18px}.location-card span,.location-card small{font-size:11px}.location-card button{grid-column:1/-1;justify-self:start;margin-top:8px;padding:7px 12px;border:0;border-radius:999px;background:#fff;color:var(--red);font-size:11px;font-weight:700}.location-card.location-error{background:#f7e7e2}.location-card.location-error strong{font-size:14px}.consent{font-size:12px}.consent input{width:20px;height:20px;flex:0 0 20px}

/* Full photo viewer */
.viewer-sheet{background:#0b1b22}
.viewer-header{min-height:64px;height:auto;padding:10px 14px;background:#0b1b22}
.viewer-header button{min-width:44px;min-height:44px;border-radius:12px;font-size:12px}
.viewer-header button:active{background:rgba(255,255,255,.09)}
.viewer-header strong{font-size:14px}.viewer-header span{font-size:10px;line-height:1.45}
.photo-stage{background:#0b1b22}
.photo-stage>img{transition:transform .18s cubic-bezier(.2,.75,.25,1),opacity .18s ease}
.viewer-info{background:#0b1b22;padding-left:18px;padding-right:18px}
.viewer-meta span{font-size:13px}.viewer-meta time{font-size:10px}.viewer-meta .viewer-location{font-size:12px}
.viewer-meta{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;align-items:center}
.viewer-meta>div{display:contents}
.viewer-title-row{grid-column:1/-1;grid-row:1;width:100%;display:flex;align-items:baseline;gap:12px;margin-bottom:6px}
.viewer-author-link{grid-column:1;grid-row:2}
.viewer-meta>.like-button{grid-column:2;grid-row:2}
.viewer-location-row{flex:0 0 auto;display:flex;align-items:baseline;gap:9px;margin-left:auto;white-space:nowrap}
.viewer-photo-title{min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#fff;font-size:17px;line-height:1.35;letter-spacing:-.02em}
.viewer-location-row time{position:relative;padding-left:9px}
.viewer-location-row time:before{content:"";position:absolute;left:0;top:50%;width:3px;height:3px;border-radius:50%;background:rgba(255,255,255,.42);transform:translateY(-50%)}
.like-button{min-width:74px;height:40px;padding:0 13px;font-size:12px;justify-content:center;box-shadow:0 4px 12px rgba(0,0,0,.12)}
.like-button span{font-size:21px}
.viewer-ranks{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:7px;padding-top:7px;border-top:1px solid rgba(255,255,255,.09)}
.viewer-rank-chips{display:flex;flex-wrap:nowrap;align-items:center;gap:7px;min-width:0}
.viewer-rank-chips>span{padding:7px 9px;border-radius:10px;background:rgba(255,255,255,.07);font-size:10px;white-space:nowrap}
.sort-indicator{min-width:108px;min-height:40px;padding:4px 12px;border:1px solid rgba(240,193,105,.34);border-radius:12px;background:rgba(240,193,105,.09);color:#f0c169;text-align:left;cursor:pointer;transition:transform .16s ease,background .16s ease}
.sort-indicator small,.sort-indicator strong{display:block}.sort-indicator small{margin-bottom:2px;color:rgba(255,255,255,.52);font-size:8px;font-weight:600}.sort-indicator strong{font-size:10px;white-space:nowrap}.sort-indicator:active{transform:scale(.95);background:rgba(240,193,105,.16)}
.viewer-swipe-note{margin:0;color:rgba(255,255,255,.66);font-size:10px}
.viewer-ad-card p{font-size:10px}.viewer-ad-card small{font-size:10px}.viewer-ad-card button{min-height:44px;font-size:12px}
.viewer-header{grid-template-columns:40px minmax(0,1fr) auto}
.viewer-header-actions{display:flex!important;flex-direction:row!important;align-items:center;gap:0;margin-right:-8px}
.viewer-header-actions button{min-width:38px;min-height:40px;padding:0 3px;font-size:9px}
.viewer-header-actions button:first-child{color:#f0c169}
.viewer-reactions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:9px}
.viewer-reactions[hidden]{display:none}.viewer-reactions button{min-width:0;min-height:32px;padding:3px 4px;border:1px solid rgba(255,255,255,.11);border-radius:9px;background:rgba(255,255,255,.055);color:rgba(255,255,255,.72);font-size:8px;font-weight:800;white-space:nowrap;cursor:pointer}
.viewer-reactions button span{margin-right:2px;color:#f0c169}.viewer-reactions button b{margin-left:2px;color:#fff;font:800 9px 'DM Sans'}
.viewer-reactions button.selected{border-color:rgba(240,193,105,.5);background:rgba(240,193,105,.14);color:#fff}

/* In portrait/near-square viewports, viewer rows never shrink into each other. */
.viewer-sheet{display:flex;flex-direction:column;overflow-x:hidden;overflow-y:auto}
.viewer-header,.photo-stage,.viewer-info{flex:0 0 auto}
.viewer-spacer{flex:1 0 0}

/* Modals and feedback */
.modal{background:rgba(7,20,26,.68)}
.modal-card{border-radius:27px;box-shadow:0 24px 70px rgba(4,20,27,.28)}
.modal-close{width:44px;height:44px;top:12px;right:12px;font-size:21px;box-shadow:0 4px 13px rgba(19,40,50,.08)}
.auth-screen{display:none;position:fixed;z-index:150;inset:0;min-width:320px;min-height:100dvh;overflow-y:auto;padding:max(24px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));place-items:center;background:
  radial-gradient(circle at 12% 5%,rgba(255,255,255,.95) 0 12%,transparent 34%),
  radial-gradient(circle at 88% 86%,rgba(227,74,55,.12) 0 8%,transparent 34%),
  linear-gradient(145deg,#f8f5ed 0%,#edf2ef 100%)}
.auth-screen.open{display:grid}
.auth-screen:before{content:"47";position:fixed;right:-.03em;bottom:-.25em;color:rgba(19,79,102,.045);font:900 clamp(230px,48vw,620px)/1 'DM Sans';letter-spacing:-.12em;pointer-events:none}
.auth-screen-card{position:relative;width:min(100%,440px);padding:34px;background:rgba(248,245,237,.96);border:1px solid rgba(255,255,255,.9);border-radius:28px;box-shadow:0 28px 90px rgba(18,49,60,.17);animation:modalIn .36s ease}
body[data-authenticated="false"]:not([data-guest="true"]) .app-shell,
body[data-authenticated="false"]:not([data-guest="true"]) #viewer{visibility:hidden;pointer-events:none}
.auth-card label,.account-name-field,.account-delete-card label{font-size:11px}
.auth-card [hidden]{display:none!important}
.auth-card input,.account-name-field input,.account-delete-card input{height:52px;font-size:14px}
.auth-card>small,.avatar-help,.account-lifecycle p,.content-delete-card>p:not(.eyebrow){font-size:10px}
.auth-mode-switch{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:0 0 16px;padding:4px;border-radius:14px;background:#e9ece9}
.auth-mode-switch button{min-height:40px;border:0;border-radius:11px;background:transparent;color:var(--muted);font-size:11px;font-weight:800;cursor:pointer}
.auth-mode-switch button.active{background:#fff;color:var(--ink);box-shadow:0 3px 12px rgba(19,40,50,.08)}
.auth-card form[data-mode="create"]{gap:11px}
.guest-browse-button{width:100%;min-height:46px;margin-top:10px;border:1px solid rgba(19,79,102,.16);border-radius:14px;background:#fff;color:var(--blue);font-size:11px;font-weight:800;cursor:pointer}
.guest-browse-button:active{transform:scale(.98)}
.auth-risk-note{margin:12px 0 0;padding:11px 12px;border-radius:12px;background:#e7f0ed;color:var(--muted);font-size:9px!important;line-height:1.6}
.toast{bottom:100px;padding:14px 19px;border-radius:16px;font-size:12px;font-weight:700;box-shadow:0 10px 28px rgba(5,20,27,.25)}

/* Deliberate, short entrances give energy without slowing navigation. */
.screen.active .compact-screen-title{animation:itemRise .42s .02s both}
.screen.active .map-toolbar,.screen.active .fan-feed-controls,.screen.active .winner-card,.screen.active .profile-hero,.screen.active .post-form,.screen.active .my-post-card{animation:itemRise .46s .07s both}
.screen.active .japan-map,.screen.active .ranking-list,.screen.active .prefecture-results,.screen.active .today-status,.screen.active .stats-grid,.screen.active .history-columns{animation:itemRise .5s .12s both}

@keyframes screenLift{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes itemRise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes livePulse{0%{box-shadow:0 0 0 0 rgba(227,74,55,.34)}60%,100%{box-shadow:0 0 0 7px rgba(227,74,55,0)}}
@keyframes winnerHalo{0%,100%{filter:brightness(1)}50%{filter:brightness(1.08)}}
@keyframes rainbowMove{to{background-position:200% 0}}

@media(max-width:380px){
  .topbar{padding-left:10px;padding-right:10px}.brand{gap:5px;font-size:17px}.brand-mark{width:34px;height:34px}.time-pill{padding-left:8px;padding-right:8px}.battle-day{font-size:7px}.avatar-button{width:38px;height:38px;min-width:38px;flex-basis:38px}
  .screen{padding-left:14px;padding-right:14px}.fans-title-row{gap:8px}.fan-feed-count{min-height:38px;padding:0 8px;font-size:9px}.fan-feed-count strong{font-size:13px}.inline-ad{grid-template-columns:38px minmax(0,1fr) auto;gap:9px;padding:16px 12px}.inline-ad-link{padding-left:10px;padding-right:10px}
  .history-column{padding:8px}.history-card-copy{padding:7px}
}

@media(max-width:599px){
  .auth-screen{padding:0;background:var(--paper);place-items:start stretch}
  .auth-screen:before{right:-.12em;bottom:-.08em;font-size:78vw}
  .auth-screen-card{width:100%;min-height:100dvh;padding:max(32px,env(safe-area-inset-top)) 24px max(28px,env(safe-area-inset-bottom));display:flex;flex-direction:column;justify-content:center;border:0;border-radius:0;box-shadow:none}
}

@media(min-width:720px){
  .screen{padding-left:clamp(30px,5vw,72px);padding-right:clamp(30px,5vw,72px)}
  .map-toolbar,.japan-map,.compact-screen-title,.fan-feed-controls,.ranking-list,.post-form,.winner-card,.prefecture-results,.profile-hero,.profile-growth,.prefecture-invite-button,.today-status,.stats-grid,.profile-history,.my-post-card,.my-post-empty,.my-post-share-button,.delete-content-button{max-width:1180px;margin-left:auto;margin-right:auto}
  .ranking-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .inline-ad{grid-column:1/-1}
  .result-grid{grid-template-columns:repeat(4,1fr)}
}

/* Wide-layout system: the viewport shape, not the device name, chooses the UI. */
@media (min-width:600px) and (min-aspect-ratio:4/3){
  :root{--wide-header:64px;--wide-rail:82px}

  .topbar{
    height:calc(var(--wide-header) + env(safe-area-inset-top));
    padding:calc(8px + env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) 8px max(18px,env(safe-area-inset-left));
  }
  #app-main{padding-top:calc(var(--wide-header) + env(safe-area-inset-top));padding-left:calc(var(--wide-rail) + env(safe-area-inset-left))}
  .screen{min-height:calc(100dvh - var(--wide-header) - env(safe-area-inset-top));padding:18px clamp(22px,4vw,64px) 34px}

  .bottom-nav{
    top:calc(var(--wide-header) + env(safe-area-inset-top));bottom:0;left:0;
    width:calc(var(--wide-rail) + env(safe-area-inset-left));height:auto;
    padding:10px 8px max(10px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
    grid-template-columns:1fr;grid-template-rows:repeat(5,minmax(50px,1fr));
    border-top:0;border-right:1px solid var(--line);box-shadow:7px 0 26px rgba(19,40,50,.055);
  }
  .bottom-nav button{min-height:50px;padding:4px 2px;border-radius:14px;font-size:10px}
  .bottom-nav button span{height:23px;font-size:20px}
  .bottom-nav button.active:not(.post-nav):after{top:20%;bottom:20%;left:-8px;right:auto;width:3px;height:auto}
  .bottom-nav .post-nav span{width:38px;height:38px;margin:0;font-size:23px}
  .bottom-nav .post-nav.active span{box-shadow:0 0 0 4px rgba(227,74,55,.12),0 7px 18px rgba(227,74,55,.32)}

  .compact-screen-title,.screen-heading.compact{padding-top:0;padding-bottom:14px}
  .compact-screen-title h1{font-size:clamp(24px,3vw,34px)}
  .screen-heading h1{font-size:clamp(28px,4vw,38px)}

  [data-screen="map"] .compact-screen-title,[data-screen="map"] .map-toolbar,[data-screen="map"] .prefecture-momentum,[data-screen="map"] .guest-guide,[data-screen="map"] .japan-map{max-width:1180px;margin-left:auto;margin-right:auto}
  .japan-map{grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;padding:12px}
  .national-tile{grid-column:1/span 2;grid-row:1/span 2}
  .pref-tile[data-pref],.pref-tile.no-post{grid-column:auto;grid-row:auto}
  .map-likes-button{grid-column:auto;grid-row:auto}
  .pref-tile span{font-size:clamp(9px,1.25vw,14px)}
  .pref-tile b{font-size:clamp(8px,1vw,12px)}

  [data-screen="fans"] .compact-screen-title,[data-screen="fans"] .fan-feed-controls,[data-screen="fans"] .ranking-list,
  [data-screen="likes"]>.standalone-back,[data-screen="likes"]>.compact-screen-title,[data-screen="likes"]>.sort-tabs,[data-screen="likes"]>.fan-feed-summary,[data-screen="likes"]>.ranking-list{
    max-width:1120px;margin-left:auto;margin-right:auto;
  }
  .fan-feed-controls .sort-tabs{padding-bottom:14px}

  .modal{padding:12px max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
  .modal-card{max-height:calc(100dvh - 24px);overflow-y:auto}

  .viewer-sheet{
    --viewer-head:64px;
    width:100%;height:100dvh;max-height:100dvh;display:grid;
    grid-template-columns:minmax(0,min(calc(100dvh - var(--viewer-head)),60vw)) minmax(230px,1fr);
    grid-template-rows:var(--viewer-head) minmax(0,1fr);
    overflow:hidden;
  }
  .viewer-header{grid-column:1/-1;grid-row:1;height:var(--viewer-head);min-height:var(--viewer-head);padding:8px max(16px,env(safe-area-inset-right)) 8px max(16px,env(safe-area-inset-left))}
  .photo-stage{grid-column:1;grid-row:2;width:100%;height:auto;max-height:calc(100dvh - var(--viewer-head));align-self:center;justify-self:center}
  .viewer-info{grid-column:2;grid-row:2;align-self:stretch;min-width:0;padding:clamp(18px,3vw,46px);display:flex;flex-direction:column;justify-content:center;overflow-y:auto}
  .viewer-spacer{display:none}
  .viewer-meta{gap:20px}.viewer-meta>div{min-width:0}.viewer-meta #viewer-author{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .viewer-ranks{margin-top:clamp(8px,1.5vh,12px);padding-top:clamp(8px,1.5vh,12px)}
  .viewer-rank-chips{gap:8px}.viewer-rank-chips>span{font-size:11px}
  .sort-indicator{min-width:116px;min-height:40px}
}

@media (min-width:760px) and (min-aspect-ratio:4/3){
  [data-screen="post"]{display:none}
  [data-screen="post"].active{display:grid;grid-template-columns:minmax(0,1fr) minmax(480px,1.5fr);gap:clamp(24px,4vw,58px);align-items:start}
  [data-screen="post"] .screen-heading{position:sticky;top:calc(var(--wide-header) + env(safe-area-inset-top) + 18px);padding:10px 0;max-width:360px}
  [data-screen="post"] .post-form{grid-template-columns:minmax(260px,1fr) minmax(250px,.9fr);grid-template-rows:auto auto auto auto 1fr;gap:14px;max-width:none;width:100%}
  [data-screen="post"] .upload-drop{grid-column:1;grid-row:1/span 5;align-self:start}
  [data-screen="post"] .crop-controls{grid-column:2;grid-row:1}
  [data-screen="post"] .post-title-field{grid-column:2;grid-row:2}
  [data-screen="post"] .location-card{grid-column:2;grid-row:3}
  [data-screen="post"] .consent{grid-column:2;grid-row:4}
  [data-screen="post"] .primary-button{grid-column:2;grid-row:5;align-self:end}

  [data-screen="my-post"] .my-post-card{max-width:900px;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(260px,.75fr);align-items:center}
  [data-screen="my-post"] .my-post-card>div{padding:clamp(24px,4vw,48px)}
  [data-screen="my-post"] .my-post-share-button,[data-screen="my-post"] .delete-content-button,[data-screen="my-post"] .my-post-empty,[data-screen="my-post"]>.compact-screen-title,[data-screen="my-post"]>.standalone-back{max-width:900px;margin-left:auto;margin-right:auto}

  [data-screen="results"]>.compact-screen-title,[data-screen="results"]>.winner-card,[data-screen="results"]>.prefecture-results{max-width:1120px;margin-left:auto;margin-right:auto}
  .winner-card{display:grid;grid-template-columns:minmax(340px,1fr) minmax(260px,.7fr);align-items:center}
  .winner-info{padding:clamp(28px,5vw,64px)}
}

@media (min-width:840px) and (min-aspect-ratio:4/3){
  [data-screen="fans"] .ranking-list,[data-screen="likes"]>.ranking-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .inline-ad{grid-column:1/-1}
}

@media (min-width:900px) and (min-aspect-ratio:4/3){
  [data-screen="profile"].active{display:grid;grid-template-columns:minmax(280px,.72fr) minmax(460px,1.28fr);grid-template-rows:auto auto auto auto auto auto auto 1fr;column-gap:clamp(26px,4vw,60px);align-items:start}
  [data-screen="profile"] .profile-hero{grid-column:1;grid-row:1}
  [data-screen="profile"] .profile-relationship-links{grid-column:1;grid-row:2}
  [data-screen="profile"] .profile-growth{grid-column:1;grid-row:3}
  [data-screen="profile"] .prefecture-invite-button{grid-column:1;grid-row:4}
  [data-screen="profile"] .today-status{grid-column:1;grid-row:5}
  [data-screen="profile"] .weekly-summary{grid-column:1;grid-row:6}
  [data-screen="profile"] .stats-grid{grid-column:1;grid-row:7;margin-bottom:12px}
  [data-screen="profile"] .history{grid-column:2;grid-row:1/span 8;min-width:0}
  [data-screen="profile"] .logout-button{grid-column:1;grid-row:8;align-self:start}
}

/* Guard bands keep two-column screens from becoming cramped at the exact breakpoint. */
@media (min-width:760px) and (max-width:959.98px) and (min-aspect-ratio:4/3){
  [data-screen="post"].active{display:block}
  [data-screen="post"] .screen-heading{position:static;max-width:none;padding-top:0}
  [data-screen="post"] .post-form{grid-template-columns:1fr;grid-template-rows:auto;max-width:700px;margin-left:auto;margin-right:auto}
  [data-screen="post"] .upload-drop,[data-screen="post"] .crop-controls,[data-screen="post"] .post-title-field,[data-screen="post"] .location-card,[data-screen="post"] .consent,[data-screen="post"] .primary-button{grid-column:auto;grid-row:auto}
}

@media (min-width:900px) and (max-width:979.98px) and (min-aspect-ratio:4/3){
  [data-screen="profile"].active{display:block}
  [data-screen="profile"] .profile-hero,[data-screen="profile"] .profile-relationship-links,[data-screen="profile"] .profile-growth,[data-screen="profile"] .prefecture-invite-button,[data-screen="profile"] .today-status,[data-screen="profile"] .stats-grid,[data-screen="profile"] .weekly-summary,[data-screen="profile"] .history,[data-screen="profile"] .logout-button{grid-column:auto;grid-row:auto}
}

@media (min-width:600px) and (min-aspect-ratio:4/3) and (max-height:480px){
  :root{--wide-header:56px;--wide-rail:74px}
  .topbar{padding-top:calc(5px + env(safe-area-inset-top));padding-bottom:5px}
  .brand{font-size:17px}.brand-mark{width:33px;height:33px}.avatar-button{width:36px;height:36px;min-width:36px;flex-basis:36px}
  .bottom-nav{padding-top:6px;padding-bottom:max(6px,env(safe-area-inset-bottom));grid-template-rows:repeat(5,minmax(44px,1fr))}
  .bottom-nav button{min-height:44px;font-size:9px}.bottom-nav button span{height:20px;font-size:18px}.bottom-nav .post-nav span{width:34px;height:34px;font-size:21px}
  .screen{padding-top:12px;padding-bottom:20px}
  .viewer-sheet{--viewer-head:56px}
  .viewer-header{padding-top:5px;padding-bottom:5px}
  .viewer-info{padding:14px clamp(16px,3vw,28px)}
  .viewer-meta span{font-size:12px}.viewer-meta time{font-size:9px}.like-button{height:40px;min-width:74px}
  .viewer-ranks{margin-top:6px;padding-top:6px;gap:12px}.viewer-rank-chips>span{padding:6px 8px;font-size:9px}.sort-indicator{min-width:104px;min-height:38px}
}

@media (max-height:760px){
  .auth-card{padding:22px 24px}
  .auth-card h2{margin:12px 0;font-size:23px;line-height:1.32}
  .auth-mode-switch{margin-bottom:10px}
  .auth-card form,.auth-card form[data-mode="create"]{gap:8px}
  .auth-card input{height:44px}
  .auth-card .primary-button{min-height:46px}
  .auth-card>p{margin:10px 0 0;font-size:10px}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}

/* Profile discovery and support actions */
.profile-hero h1{font-size:20px;line-height:1.25;letter-spacing:-.02em}
[data-screen="profile"]{padding-top:7px}
[data-screen="profile"] .profile-hero{padding-top:3px}
[data-screen="profile"] .profile-hero h1{font-size:16px;font-weight:700;letter-spacing:0}
[data-screen="user-profile"] .profile-hero h1{font-size:16px;font-weight:700;letter-spacing:0}
.user-avatar-link{padding:0;border:0;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease}
.user-avatar-link:active{transform:scale(.92)}
.author-link,.viewer-author-link{padding:0;border:0;background:none;color:inherit;font:inherit;font-weight:800;cursor:pointer;text-align:left}
.author-link{text-decoration:underline;text-decoration-color:rgba(19,79,102,.24);text-underline-offset:3px}
.author-link:active,.viewer-author-link:active{opacity:.62}
.viewer-author-link{display:inline-flex;align-items:center;gap:7px;max-width:100%;margin-top:5px;color:rgba(255,255,255,.82)}
.viewer-author-avatar{flex:0 0 auto;width:27px;height:27px;display:grid;place-items:center;overflow:hidden;border:1px solid rgba(255,255,255,.22);border-radius:50%;background:linear-gradient(145deg,#e75d4c,#f0a54a);color:#fff;font-size:10px;font-weight:900}
.viewer-author-avatar img{width:100%;height:100%;object-fit:cover}
.viewer-author-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:800}
.viewer-author-link:disabled{cursor:default}
.fan-card p{display:flex;min-width:0;align-items:baseline;gap:0}
.fan-card p .author-link{min-width:0;max-width:58%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fan-card p span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fan-following-card{min-height:108px;display:grid;grid-template-columns:88px minmax(0,1fr);gap:12px;align-items:stretch;padding:10px}
.fan-following-card>.fan-post-thumb{width:88px;height:88px;border-radius:13px;object-fit:cover}
.fan-card-body{min-width:0;display:grid;grid-template-rows:auto 1fr auto;gap:6px;padding:2px 0}
.fan-card-author{min-width:0;display:flex;align-items:center;gap:8px}
.fan-card-author .fan-avatar{flex:0 0 auto;width:30px;height:30px}
.fan-card-author .author-link{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;font-size:11px}
.fan-following-card h3{align-self:center;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.fan-card-footer{display:flex;align-items:center;justify-content:space-between;gap:8px}
.fan-following-card .fan-card-footer strong{font-size:13px}
.fan-following-card .fan-card-footer time{margin:0;white-space:nowrap;font-size:9px}
.fan-card-post-meta{min-width:0;display:flex;align-items:center;justify-content:flex-end;gap:6px;color:var(--muted);white-space:nowrap}
.fan-card-post-meta span{max-width:52px;overflow:hidden;text-overflow:ellipsis;font-size:9px}
.fan-card-post-meta time{position:relative;padding-left:7px}
.fan-card-post-meta time:before{content:"";position:absolute;left:0;top:50%;width:2px;height:2px;border-radius:50%;background:currentColor;transform:translateY(-50%)}

.public-profile-hero{grid-template-columns:82px 1fr;padding-bottom:18px}
.public-profile-quick-row{display:grid;grid-template-columns:minmax(96px,.8fr) minmax(88px,.7fr) minmax(0,1.2fr);gap:8px;margin-bottom:10px}
.public-block-button{min-height:48px;padding:8px 10px;border:1px solid #dfb5b0;border-radius:14px;background:#fff7f6;color:#9d342d;font-size:10px;font-weight:900}
.public-block-button.is-blocked{border-color:#9d342d;background:#9d342d;color:#fff}
.public-support-button:disabled{opacity:.48}
.blocked-photo{filter:none!important}
@media(max-width:390px){.public-profile-quick-row{grid-template-columns:1fr 1fr}.public-profile-growth{grid-column:1/-1}}
.public-support-button{width:100%;min-width:0;min-height:58px;padding:0 10px;border:0;border-radius:17px;background:var(--red);color:#fff;font-size:11px;font-weight:800;box-shadow:0 7px 18px rgba(227,74,55,.22);cursor:pointer}
.public-support-button.is-supported{border:1px solid rgba(19,79,102,.16);background:#fff;color:var(--blue);box-shadow:none}
.public-profile-growth{grid-template-columns:38px minmax(0,1fr);gap:7px;margin:0;padding:10px}
.public-profile-growth .profile-badge-mark{width:38px;height:38px;font-size:17px}
.public-profile-growth strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}
.public-stats-grid{margin-bottom:26px}
.public-posts{margin-top:22px}
.public-post-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
.public-post-card{position:relative;width:100%;max-width:360px;aspect-ratio:1;overflow:hidden;padding:0;border:0;border-radius:18px;background:#dce8ec;color:#fff;cursor:pointer;box-shadow:0 5px 15px rgba(19,40,50,.08)}
.public-post-card img{width:100%;height:100%;display:block;object-fit:cover;transition:transform .2s ease}
.public-post-card:active img{transform:scale(.97)}
.public-post-card:after{content:"";position:absolute;inset:45% 0 0;background:linear-gradient(transparent,rgba(4,17,23,.72));pointer-events:none}
.public-post-card span,.public-post-card strong{position:absolute;z-index:1;bottom:8px;font-size:9px}.public-post-card span{left:8px}.public-post-card strong{right:8px}
.public-post-empty{grid-column:1/-1;padding:32px 16px;border-radius:16px;background:#fff;color:var(--muted);font-size:11px;text-align:center}

.profile-settings-card{display:grid;gap:11px}
.profile-settings-card h2{margin-bottom:6px}
.notification-settings{padding:14px;border:1px solid rgba(19,79,102,.11);border-radius:15px;background:#e7f0ed}
.notification-settings>div{display:flex;align-items:center;justify-content:space-between}.notification-settings strong{font-size:11px}.notification-settings span{padding:4px 8px;border-radius:999px;background:#fff;color:var(--muted);font-size:8px;font-weight:800}.notification-settings span.enabled{background:var(--blue);color:#fff}
.notification-settings p{margin:6px 0 10px;color:var(--muted);font-size:9px;line-height:1.55}.notification-settings button{width:100%;min-height:42px;border:0;border-radius:12px;background:#fff;color:var(--blue);font-size:10px;font-weight:800}
.settings-logout-button{width:100%;min-height:46px;border:1px solid rgba(19,79,102,.14);border-radius:14px;background:#fff;color:var(--muted);font-size:11px;font-weight:800;cursor:pointer}
.settings-logout-button:active{transform:scale(.98)}
.settings-invite-button{width:100%;min-height:54px;margin-top:10px;padding:9px 13px;display:flex;align-items:center;gap:10px;border:1px solid rgba(227,74,55,.18);border-radius:14px;background:#fff5f1;color:var(--ink);text-align:left;cursor:pointer}
.settings-invite-button>span:first-child{flex:0 0 auto;width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:var(--red);color:#fff;font-size:17px}
.settings-invite-button strong,.settings-invite-button small{display:block}.settings-invite-button strong{font-size:11px}.settings-invite-button small{margin-top:2px;color:var(--muted);font-size:8px}
.handle-input{display:grid;grid-template-columns:1fr;align-items:center;border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}
.handle-input b{display:grid;place-items:center;height:52px;background:#f3f7f8;color:var(--blue);font-size:15px}
.account-name-field .handle-input input{height:50px;border:0;border-radius:0}
.account-name-field .handle-input input[readonly]{background:#f7f8f7;color:var(--blue);font-weight:800;cursor:default}
.account-name-field select{width:100%;height:52px;padding:0 42px 0 13px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font-size:14px}
.account-name-field small{font-size:8px;line-height:1.45}
.profile-prefecture-privacy{display:flex;align-items:center;gap:11px;margin-top:-3px;padding:11px 12px;border:1px solid rgba(19,79,102,.1);border-radius:13px;background:#f7faf9;cursor:pointer}
.profile-prefecture-privacy input{width:18px;height:18px;margin:0;accent-color:var(--red)}
.profile-prefecture-privacy span{display:grid;gap:3px}.profile-prefecture-privacy strong{font-size:10px}.profile-prefecture-privacy small{color:var(--muted);font-size:8px;line-height:1.45}
.profile-prefecture-privacy:has(input:disabled){opacity:.55;cursor:default}

.supporting-users-link{min-height:42px;padding:0 13px;border:1px solid rgba(19,79,102,.14);border-radius:13px;background:#fff;color:var(--blue);font-size:9px;font-weight:800;white-space:nowrap;cursor:pointer;box-shadow:0 4px 13px rgba(19,40,50,.05)}
.supporting-users-link span{margin-right:6px;color:var(--red);font-size:7px;letter-spacing:-2px}
.fan-user-actions{width:100%;display:grid;grid-template-columns:minmax(0,42fr) minmax(0,58fr);gap:8px;margin-bottom:12px}
.fan-user-actions .supporting-users-link{width:100%;min-width:0;min-height:44px;display:inline-flex;align-items:center;justify-content:center;padding:0 clamp(6px,2.5vw,13px);font-size:clamp(8px,2.4vw,10px);line-height:1.2;text-align:center}
.fan-user-actions .supporting-users-link span{flex:0 0 auto;display:inline-grid;place-items:center;height:18px;line-height:1}
.user-search-link .user-search-icon{position:relative;width:15px;height:15px;margin-right:7px;letter-spacing:0}
.user-search-icon:before{content:"";position:absolute;left:1px;top:1px;width:8px;height:8px;border:2px solid var(--red);border-radius:50%}
.user-search-icon:after{content:"";position:absolute;right:1px;bottom:2px;width:6px;height:2px;border-radius:99px;background:var(--red);transform:rotate(45deg);transform-origin:center}
.user-search-form{display:grid;gap:7px;margin-bottom:12px;padding:15px;border:1px solid rgba(19,79,102,.1);border-radius:18px;background:#fff;box-shadow:0 5px 18px rgba(19,40,50,.05)}
.user-search-form>label{color:var(--muted);font-size:9px;font-weight:800}
.user-search-form>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.user-search-form input{min-width:0;height:46px;padding:0 13px;border:1px solid var(--line);border-radius:13px;background:#f8faf9;color:var(--ink);font-size:13px}
.user-search-form button{min-width:72px;border:0;border-radius:13px;background:var(--ink);color:#fff;font-size:11px;font-weight:800;cursor:pointer}
.user-search-form button:disabled{opacity:.55;cursor:wait}
.user-search-form small,.user-search-status{color:var(--muted);font-size:9px}
.user-search-status{min-height:28px;padding:5px 3px 12px}
.user-search-results mark{padding:0;background:#ffe3d8;color:inherit}
.supporting-users-summary{display:flex;align-items:center;justify-content:space-between;margin:-4px 0 14px;padding:13px 15px;border-radius:14px;background:#e7f0ed;color:var(--blue);font-size:10px}
.supporting-users-summary strong{font-size:10px}.supporting-users-summary b{margin-right:2px;font:800 18px 'DM Sans'}
.supporting-users-list{display:grid;gap:10px}
.supporting-user-card{width:100%;display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px;border:1px solid rgba(19,40,50,.05);border-radius:18px;background:#fff;text-align:left;cursor:pointer;box-shadow:0 5px 18px rgba(19,40,50,.055)}
.supporting-user-avatar{width:48px;height:48px;display:grid;place-items:center;border-radius:50%;background:linear-gradient(145deg,#2b687d,#133b4b);color:#fff;font-size:15px;font-weight:800}
.supporting-user-copy{min-width:0}.supporting-user-copy strong,.supporting-user-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.supporting-user-copy strong{font-size:13px}.supporting-user-copy small{margin-top:4px;color:var(--muted);font-size:9px}
.supporting-user-arrow{color:var(--red);font-size:9px;font-weight:800}.supporting-users-empty{display:grid;gap:5px;padding:34px 18px;border-radius:18px;background:#fff;text-align:center}.supporting-users-empty strong{font-size:13px}.supporting-users-empty span{color:var(--muted);font-size:9px}
.public-history{margin-top:28px}
.profile-relationship-links{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:12px}
.profile-relationship-links button{display:grid;grid-template-columns:1fr auto;gap:2px 8px;align-items:center;padding:13px 14px;border:1px solid rgba(19,79,102,.1);border-radius:16px;background:#fff;text-align:left;cursor:pointer;box-shadow:0 5px 16px rgba(19,40,50,.05)}
.profile-relationship-links span{color:var(--muted);font-size:9px;font-weight:700}.profile-relationship-links strong{grid-row:1/3;grid-column:2;color:var(--blue);font-size:10px}.profile-relationship-links strong b{margin-right:2px;font:800 19px 'DM Sans'}.profile-relationship-links small{color:var(--red);font-size:8px;font-weight:800}
.supporters-summary{background:#f3e9e4;color:var(--red)}
.weekly-summary{margin:0 0 29px;padding:16px;border:1px solid rgba(19,79,102,.1);border-radius:20px;background:linear-gradient(145deg,#fff,#edf3f0);box-shadow:var(--shadow-soft)}
.weekly-summary .section-title{margin-bottom:11px}.weekly-summary .section-title>span{font-size:8px}.weekly-summary-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:7px}.weekly-summary-grid article{padding:11px;border-radius:13px;background:rgba(255,255,255,.8)}.weekly-summary-grid span{display:block;color:var(--muted);font-size:8px}.weekly-summary-grid strong{font-size:15px}.weekly-summary-grid small{margin-left:2px;font-size:8px}.weekly-summary>p{margin:10px 2px 0;color:var(--muted);font-size:8px}

@media (min-width:720px){
  [data-screen="user-profile"]>.standalone-back,[data-screen="user-profile"]>.profile-hero,[data-screen="user-profile"]>.public-profile-quick-row,[data-screen="user-profile"]>.prefecture-invite-button,[data-screen="user-profile"]>.stats-grid,[data-screen="user-profile"]>.public-posts,[data-screen="user-profile"]>.public-weekly-summary{max-width:920px;margin-left:auto;margin-right:auto}
  [data-screen="user-profile"]>.public-history,[data-screen="supporting-users"]>.standalone-back,[data-screen="supporting-users"]>.compact-screen-title,[data-screen="supporting-users"]>.supporting-users-summary,[data-screen="supporting-users"]>.supporting-users-list,[data-screen="user-search"]>.standalone-back,[data-screen="user-search"]>.compact-screen-title,[data-screen="user-search"]>.user-search-form,[data-screen="user-search"]>.user-search-status,[data-screen="user-search"]>.user-search-results{max-width:920px;margin-left:auto;margin-right:auto}
  [data-screen="supporters"]>.standalone-back,[data-screen="supporters"]>.compact-screen-title,[data-screen="supporters"]>.supporting-users-summary,[data-screen="supporters"]>.supporting-users-list{max-width:920px;margin-left:auto;margin-right:auto}
  .supporting-users-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .public-post-grid{gap:12px}
}

@media (min-width:900px) and (min-aspect-ratio:4/3){
  [data-screen="user-profile"].active{display:grid;grid-template-columns:minmax(280px,.72fr) minmax(460px,1.28fr);grid-template-rows:auto auto auto auto auto auto 1fr;column-gap:clamp(26px,4vw,60px);align-items:start}
  [data-screen="user-profile"]>.standalone-back{grid-column:1;grid-row:1;margin:0}
  [data-screen="user-profile"]>.profile-hero{grid-column:1;grid-row:2;width:100%}
  [data-screen="user-profile"]>.public-profile-quick-row{grid-column:1;grid-row:3;width:100%}
  [data-screen="user-profile"]>.prefecture-invite-button{grid-column:1;grid-row:4;width:100%}
  [data-screen="user-profile"]>.public-posts{grid-column:1;grid-row:5;width:100%;margin-top:24px}
  [data-screen="user-profile"]>.public-weekly-summary{grid-column:1;grid-row:6;width:100%}
  [data-screen="user-profile"]>.stats-grid{grid-column:1;grid-row:7;width:100%;margin-bottom:0}
  [data-screen="user-profile"]>.public-history{grid-column:2;grid-row:1/span 7;width:100%;margin-top:0}
}

/* 2026 readability pass: consistent spacing, legible secondary text, and safer compact layouts. */
.section-title{gap:12px}
.section-title h2{line-height:1.28}
.section-title>span{flex:0 0 auto;line-height:1.4;text-align:right}
.standalone-back{display:inline-flex;align-items:center;margin-bottom:5px}

/* Keep adjacent profile sections visually separate. */
.today-status{margin:0 0 16px}
.weekly-summary{margin-top:0;margin-bottom:24px}
.weekly-summary .section-title>span{font-size:9px}
.weekly-summary-grid span{font-size:9px;line-height:1.4}
.weekly-summary-grid strong{line-height:1.35}
.weekly-summary-grid small{font-size:9px}
.weekly-summary>p{font-size:9px;line-height:1.65}
.profile-growth small{font-size:8px}
.profile-growth p{font-size:9px;line-height:1.45}
.profile-relationship-links button{min-height:62px}
.profile-relationship-links span{font-size:10px}
.profile-relationship-links small{font-size:9px}

/* Feed, list, and result metadata stay readable without making cards larger. */
.fan-card-post-meta span,.fan-card-post-meta time{font-size:10px}
.fan-card-author .author-link{min-height:32px;display:inline-flex;align-items:center}
.supporting-user-card{min-height:74px}
.supporting-user-copy small{font-size:10px}
.supporting-user-arrow{font-size:10px}
.prefecture-result-item small{font-size:10px}
.prefecture-winner-card small{font-size:10px;line-height:1.45}
.all-prefecture-results summary{padding-left:15px;padding-right:15px}

/* Forms and dialogs use a stable reading rhythm. */
.account-name-field{line-height:1.45}
.account-name-field small{font-size:9px;line-height:1.6}
.profile-settings-card{gap:13px}
.profile-settings-card .avatar-preview{width:136px;height:136px;margin-bottom:9px}
.notification-settings p,.account-lifecycle p,.avatar-help{font-size:10px}
.consent{line-height:1.75}

@media(max-width:599px){
  .screen{padding-top:17px}
  [data-screen="profile"]{padding-top:7px}
  .compact-screen-title{padding-bottom:17px}
  .compact-screen-title h1{font-size:clamp(24px,7vw,29px)}

  .today-status{min-height:86px;padding:17px 16px;column-gap:8px}
  .today-status strong{font-size:14px;line-height:1.4}
  .today-status button{max-width:118px;padding:6px 0 6px 8px;line-height:1.5;text-align:right}
  .weekly-summary{padding:15px;margin-bottom:22px}
  .weekly-summary-grid article{min-height:58px;padding:10px}

  .stats-grid{gap:8px;margin-top:12px}
  .stats-grid article{padding:15px}
  .stats-grid strong{font-size:26px}

  .profile-growth{grid-template-columns:44px minmax(0,1fr) auto;padding:12px;gap:9px}
  .profile-badge-mark{width:44px;height:44px;font-size:21px}
  .profile-badge-side>button{min-height:30px;padding:6px 9px}

  .fan-following-card{grid-template-columns:82px minmax(0,1fr);min-height:102px;gap:10px}
  .fan-following-card>.fan-post-thumb{width:82px;height:82px}
  .fan-following-card h3{font-size:13px}
  .fan-card-post-meta{gap:5px}

  .supporting-user-card{grid-template-columns:46px minmax(0,1fr) auto;gap:10px;padding:11px}
  .supporting-user-avatar{width:46px;height:46px}

  .modal{padding:10px}
  .modal-card{width:100%;max-height:calc(100dvh - 20px);overflow-y:auto;padding:26px 20px 22px;border-radius:23px}
  .profile-settings-card h2{padding-right:42px;font-size:23px}

  .winner-info{padding:18px}
  .winner-info h2{font-size:21px}
  .prefecture-results{margin-top:29px;padding-top:23px}
}

@media(max-width:350px){
  .today-status{grid-template-columns:minmax(0,1fr);min-height:0}
  .today-status button{grid-row:auto;grid-column:auto;max-width:none;padding:8px 0 0;text-align:left}
  .profile-relationship-links button{padding:11px}
  .profile-relationship-links strong b{font-size:17px}
  .profile-growth{grid-template-columns:40px minmax(0,1fr)}
  .profile-badge-mark{width:40px;height:40px}
  .profile-badge-side{grid-column:1/-1;flex-direction:row;align-items:center}
  .history-columns{gap:7px}
}
