:root {
  --paper:#f7f0e5; --paper-2:#efe0cc; --ink:#4b3529; --muted:#876f5e;
  --terracotta:#a96f52; --terracotta-dark:#7e4f3a; --rose:#bd7a72; --line:rgba(105,72,50,.16);
  --card:rgba(255,252,247,.72); --shadow:0 20px 55px rgba(88,58,37,.12);
  font-family:"Noto Serif SC","Songti SC","PingFang SC","Microsoft YaHei",serif;
  color:var(--ink); background:var(--paper);
}
*{box-sizing:border-box} html{scroll-behavior:smooth} body{margin:0;min-height:100vh;overflow-x:hidden;
background:radial-gradient(circle at 50% 0,#fffaf3 0,transparent 32%),linear-gradient(180deg,#faf4ea 0%,#efe0ca 100%)}
button,input{font:inherit}.paper-noise{position:fixed;inset:0;pointer-events:none;opacity:.12;z-index:20;
background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='110' height='110'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.76' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E")}
.topbar{position:sticky;top:0;z-index:10;display:flex;align-items:center;justify-content:space-between;padding:14px max(20px,calc((100vw - 1120px)/2));
background:rgba(250,244,234,.82);backdrop-filter:blur(18px);border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink)}.brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;
background:var(--terracotta-dark);color:#fff8ed;font-weight:700}.brand strong,.brand small{display:block}.brand small{font:11px/1.3 system-ui,sans-serif;color:var(--muted);letter-spacing:.08em}
nav{display:flex;gap:22px}nav a{color:var(--muted);text-decoration:none;font-size:14px}nav a:hover{color:var(--terracotta-dark)}
main{position:relative;z-index:1}.section{width:min(1120px,calc(100% - 32px));margin:0 auto;padding:76px 0}.hero{min-height:calc(100vh - 68px);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding-top:44px}
.eyebrow{margin:0 0 12px;font:700 12px/1.4 system-ui,sans-serif;letter-spacing:.22em;color:var(--terracotta)}h1,h2,p{margin-top:0}h1{margin-bottom:18px;font-size:clamp(38px,6vw,72px);line-height:1.1;font-weight:600;letter-spacing:.025em}
.lead,.section-heading>p,.section-heading div>p{color:var(--muted);line-height:1.9}.lead{max-width:700px;margin:0 auto 34px;font-size:clamp(15px,2vw,19px)}
.portrait-stage{position:relative;width:min(88vw,650px);padding:24px}.frame{padding:18px;border-radius:8px;
background:linear-gradient(135deg,rgba(255,255,255,.24),transparent 20%),linear-gradient(145deg,#6e422b,#a67450 35%,#70452f 70%,#9a6647);
box-shadow:0 34px 70px rgba(81,49,29,.23),0 8px 20px rgba(81,49,29,.16),inset 0 0 0 2px rgba(255,255,255,.13),inset 0 0 0 5px rgba(49,28,16,.14);transform:rotate(-.25deg)}
.mat{padding:17px;background:#faf3e8;box-shadow:inset 0 0 18px rgba(73,48,31,.18)}.mat img{display:block;width:100%;height:auto;border-radius:2px;filter:saturate(.94) contrast(.99) sepia(.025)}
.tape{position:absolute;top:9px;z-index:3;width:86px;height:27px;background:rgba(225,199,158,.72);box-shadow:0 3px 7px rgba(70,45,28,.08)}.tape-left{left:7%;transform:rotate(-7deg)}.tape-right{right:7%;transform:rotate(7deg)}
.photo-caption{margin:24px auto 0;color:var(--muted);font-size:15px;letter-spacing:.04em}.dashboard,.board-section{padding-top:88px}.section-heading{text-align:center;margin-bottom:34px}.section-heading h2{margin-bottom:12px;font-size:clamp(30px,4vw,46px);font-weight:600}
.card{border:1px solid var(--line);background:var(--card);box-shadow:var(--shadow);backdrop-filter:blur(12px);border-radius:24px}.today-grid{display:grid;grid-template-columns:1.08fr .92fr;gap:24px;align-items:stretch}
.calendar-card{padding:26px}.calendar-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.calendar-head button{width:42px;height:42px;border:0;border-radius:50%;background:#f0dfcc;color:var(--ink);font-size:28px;cursor:pointer}
.calendar-head div{text-align:center}.calendar-head strong{display:block;font-size:22px}.calendar-head small{display:block;margin-top:4px;color:var(--muted)}
.weekdays,.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:7px}.weekdays{margin-bottom:7px;color:#9a8372;font-size:12px;text-align:center}.weekdays span{padding:7px}
.calendar-day{aspect-ratio:1;display:grid;place-items:center;border-radius:50%;font:14px/1 system-ui,sans-serif;color:#5e4b3f}.calendar-day.muted{opacity:.28}.calendar-day.today{background:var(--terracotta-dark);color:#fff;font-weight:700}.calendar-day.selected{outline:2px solid rgba(126,79,58,.28);outline-offset:2px}
.text-button{display:block;margin:18px auto 0;border:0;background:transparent;color:var(--terracotta-dark);cursor:pointer}.weather-stack{display:grid;grid-template-rows:1fr 1fr;gap:24px}
.weather-card{padding:25px 28px;min-height:0;background:linear-gradient(135deg,rgba(255,250,242,.87),rgba(242,224,204,.78))}.weather-top{display:flex;align-items:flex-start;justify-content:space-between}.city-cn{margin-bottom:2px;font-size:21px;font-weight:700}.city-en{margin:0;color:var(--muted);font:12px/1.4 system-ui,sans-serif;letter-spacing:.08em}.weather-icon{font-size:38px}
.temp{margin-top:14px;font:600 52px/1 system-ui,sans-serif}.temp sup{font-size:18px;vertical-align:top;margin-left:3px}.weather-desc{margin:10px 0 17px;color:var(--muted)}.weather-meta{display:flex;gap:14px;flex-wrap:wrap;color:#786354;font:12px/1.4 system-ui,sans-serif}.weather-meta span{padding:7px 10px;border-radius:999px;background:rgba(255,255,255,.48)}
.board-heading{display:flex;align-items:flex-end;justify-content:space-between;text-align:left;gap:24px}.board-heading>div:first-child{max-width:720px}.sync-status{flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:9px 13px;border-radius:999px;background:rgba(255,255,255,.55);color:var(--muted);font:12px/1 system-ui,sans-serif}
.sync-status span{width:8px;height:8px;border-radius:50%;background:#c29a6b;box-shadow:0 0 0 4px rgba(194,154,107,.12)}.sync-status.online span{background:#6e9b76}.sync-status.offline span{background:#c36c63}
.board-shell{overflow:hidden}.board-toolbar{display:flex;align-items:center;gap:15px;flex-wrap:wrap;padding:14px 18px;border-bottom:1px solid var(--line);background:rgba(255,249,240,.62)}
.board-toolbar label{display:flex;align-items:center;gap:8px;color:var(--muted);font:13px/1 system-ui,sans-serif}.board-toolbar input[type=color]{width:32px;height:32px;padding:2px;border:1px solid var(--line);border-radius:50%;background:transparent}.board-toolbar input[type=range]{width:110px;accent-color:var(--terracotta-dark)}
.tool-button{border:1px solid var(--line);background:#fff8ef;color:var(--ink);padding:8px 13px;border-radius:999px;cursor:pointer}.tool-button.active{background:var(--terracotta-dark);color:#fff;border-color:var(--terracotta-dark)}.tool-button.danger{margin-left:auto;color:#a0524d}
.canvas-wrap{position:relative;width:100%;height:min(62vh,620px);min-height:390px;background:
linear-gradient(rgba(148,111,79,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(148,111,79,.055) 1px,transparent 1px),#fffdf8;background-size:24px 24px}
#family-board{display:block;width:100%;height:100%;touch-action:none;cursor:crosshair}.board-empty{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;color:rgba(126,79,58,.25);font-size:28px;letter-spacing:.08em}.board-empty.hidden{display:none}.board-tip{margin:0;padding:12px 18px;color:var(--muted);font-size:12px;text-align:center;border-top:1px solid var(--line)}
footer{position:relative;z-index:1;display:flex;justify-content:center;gap:10px;padding:34px 20px 46px;color:#9a8371;font-size:12px;letter-spacing:.08em}
@media(max-width:820px){nav{display:none}.section{padding:58px 0}.hero{min-height:auto;padding-top:48px}.today-grid{grid-template-columns:1fr}.weather-stack{grid-template-columns:1fr 1fr;grid-template-rows:none}.board-heading{align-items:flex-start;flex-direction:column}.canvas-wrap{height:52vh;min-height:360px}.tool-button.danger{margin-left:0}}
@media(max-width:560px){.topbar{padding:11px 16px}.section{width:min(100% - 22px,1120px)}h1{font-size:39px}.portrait-stage{width:96vw;padding:14px}.frame{padding:11px}.mat{padding:10px}.tape{width:66px;height:21px;top:2px}.today-grid{gap:14px}.weather-stack{grid-template-columns:1fr;gap:14px}.calendar-card,.weather-card{padding:20px}.board-toolbar{gap:11px}.canvas-wrap{min-height:330px}.weather-meta{gap:7px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
/* v5 calendar + family wall */
.calendar-day{position:relative;aspect-ratio:1;border:0;background:transparent;padding:4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border-radius:14px;cursor:pointer;transition:.16s ease}
.calendar-day:hover{background:rgba(169,111,82,.09);transform:translateY(-1px)}
.calendar-day .solar-day{font:600 14px/1 system-ui,sans-serif}
.calendar-day .lunar-day{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:10px/1.1 system-ui,sans-serif;color:#9a8372}
.calendar-day.has-festival .lunar-day,.calendar-day.has-term .lunar-day{color:#b06a50;font-weight:700}
.calendar-day.today{background:var(--terracotta-dark);color:#fff}.calendar-day.today .lunar-day{color:#fbeee3}
.calendar-day.selected:not(.today){outline:2px solid rgba(126,79,58,.4);background:rgba(169,111,82,.08)}
.calendar-day.muted{opacity:.28}
.selected-day-detail{margin-top:18px;padding:13px 15px;border-radius:15px;background:rgba(244,229,211,.62);color:var(--muted);font-size:13px;line-height:1.7;min-height:48px}
.selected-day-detail strong{color:var(--ink);margin-right:8px}
.weather-stack{grid-template-rows:auto 1fr 1fr}
.weather-date-strip{display:flex;justify-content:space-between;align-items:center;padding:0 4px;color:var(--ink)}
.weather-date-strip span{font-weight:700}.weather-date-strip small{color:var(--muted)}
.weather-card.loading{opacity:.62}.weather-card.unavailable .temp{font-size:28px}.weather-card.unavailable .temperature{font-size:28px}
.family-grid{display:grid;grid-template-columns:.72fr 1.28fr;gap:24px;align-items:start}
.profile-card,.message-card{padding:24px}.profile-card h3{margin:0 0 18px;font-size:22px}.profile-row{display:flex;gap:14px;align-items:center}
.avatar{display:grid;place-items:center;border-radius:50%;background:#f2dfc8;border:1px solid var(--line);user-select:none}.avatar.big{width:68px;height:68px;font-size:34px;flex:0 0 auto}
.profile-row>div:last-child{display:flex;gap:8px;flex:1}.profile-row input{min-width:0;flex:1;border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:#fffaf3;color:var(--ink);outline:none}
.primary-button{border:0;border-radius:12px;padding:10px 15px;background:var(--terracotta-dark);color:#fff8ef;cursor:pointer}
.avatar-picker{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 24px}.avatar-choice{width:38px;height:38px;border:1px solid var(--line);border-radius:50%;background:#fff9f1;cursor:pointer;font-size:20px}.avatar-choice.active{outline:2px solid var(--terracotta);outline-offset:2px}
.visitors-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;color:var(--muted);font-size:13px}.visitors-title strong{color:var(--ink)}
.visitor-list{display:flex;flex-wrap:wrap;gap:8px}.visitor-chip{display:flex;align-items:center;gap:6px;padding:6px 9px;border-radius:999px;background:#f7ead9;color:#725b4a;font-size:12px}.visitor-chip .avatar{width:24px;height:24px;font-size:14px}
.message-card{min-height:420px;display:flex;flex-direction:column}.message-list{display:flex;flex-direction:column;gap:12px;max-height:520px;overflow:auto;padding-right:4px;flex:1}
.message-item{display:grid;grid-template-columns:38px 1fr;gap:10px;padding:13px;border:1px solid rgba(105,72,50,.11);border-radius:16px;background:rgba(255,250,244,.72)}
.message-item .avatar{width:38px;height:38px;font-size:20px}.message-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:5px}.message-head strong{font-size:14px}.message-head time{color:#9a8372;font:11px/1.3 system-ui,sans-serif}.message-text{margin:0;white-space:pre-wrap;word-break:break-word;color:#674f40;line-height:1.7;font-size:14px}
.message-empty{display:grid;place-items:center;min-height:250px;color:#b59b87;text-align:center}
.message-form{border-top:1px solid var(--line);margin-top:16px;padding-top:16px}.message-form textarea{display:block;width:100%;min-height:92px;resize:vertical;border:1px solid var(--line);border-radius:14px;padding:12px;background:#fffaf3;color:var(--ink);outline:none}.message-form>div{display:flex;justify-content:space-between;align-items:center;margin-top:10px}.message-form span{color:#a18a78;font-size:11px}
@media(max-width:820px){.family-grid{grid-template-columns:1fr}.weather-stack{grid-template-rows:auto auto auto}.calendar-day{border-radius:11px}.calendar-day .lunar-day{font-size:9px}}
@media(max-width:560px){.calendar-card{padding:16px}.weekdays,.calendar-grid{gap:3px}.calendar-day{padding:2px;min-width:0}.calendar-day .solar-day{font-size:13px}.calendar-day .lunar-day{font-size:8px}.profile-row>div:last-child{flex-direction:column}.message-card,.profile-card{padding:18px}.weather-date-strip{align-items:flex-start;flex-direction:column;gap:4px}}

/* v6 private photo + multi-board */
.photo-lock-wrap{position:relative;overflow:hidden}
#family-photo{transition:filter .35s ease,opacity .35s ease}
.photo-lock{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:26px;text-align:center;background:linear-gradient(180deg,rgba(42,27,20,.20),rgba(42,27,20,.42));color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.28);backdrop-filter:blur(1px)}
.photo-lock.hidden{display:none}.lock-icon{font-size:34px;margin-bottom:9px}.photo-lock strong{font-size:18px}.photo-lock p{margin:7px 0 14px;color:rgba(255,255,255,.9);font-size:13px}
.photo-lock form{display:flex;gap:8px;width:min(100%,320px)}.photo-lock input{min-width:0;flex:1;border:1px solid rgba(255,255,255,.34);border-radius:12px;padding:10px 12px;background:rgba(255,255,255,.92);color:#4b3529;outline:none}
.photo-lock button{border:0;border-radius:12px;padding:10px 13px;background:#7e4f3a;color:#fff8ef;cursor:pointer;white-space:nowrap}.photo-lock small{min-height:18px;margin-top:8px;color:#ffe1db}
.board-switcher{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 18px;border-bottom:1px solid var(--line);background:rgba(255,249,240,.78)}
.board-switcher label{display:flex;align-items:center;gap:10px;color:var(--muted);font:13px/1 system-ui,sans-serif}.board-switcher select{min-width:180px;max-width:320px;border:1px solid var(--line);border-radius:12px;padding:9px 34px 9px 11px;background:#fffaf3;color:var(--ink)}
@media(max-width:560px){.photo-lock{padding:16px}.photo-lock form{flex-direction:column;width:min(100%,250px)}.board-switcher{align-items:stretch;flex-direction:column}.board-switcher label{justify-content:space-between}.board-switcher select{min-width:0;flex:1}}

/* v7 mobile polish */
.mobile-nav{display:none}
.section{scroll-margin-top:84px}
button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}
@media(max-width:820px){
  body{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
  .topbar{position:sticky;top:0;padding-top:max(10px,env(safe-area-inset-top));min-height:58px}
  .brand-mark{width:34px;height:34px}.brand strong{font-size:14px}.brand small{font-size:10px}
  .mobile-nav{position:fixed;left:10px;right:10px;bottom:max(10px,env(safe-area-inset-bottom));z-index:50;display:grid;grid-template-columns:repeat(4,1fr);padding:7px;border:1px solid rgba(105,72,50,.14);border-radius:20px;background:rgba(255,250,243,.92);box-shadow:0 10px 35px rgba(70,45,28,.18);backdrop-filter:blur(18px)}
  .mobile-nav a{display:flex;min-height:50px;flex-direction:column;align-items:center;justify-content:center;gap:2px;border-radius:14px;color:var(--muted);text-decoration:none}
  .mobile-nav a:active{background:#f2dfcc;color:var(--terracotta-dark)}
  .mobile-nav span{font-size:20px;line-height:1}.mobile-nav small{font:11px/1.1 system-ui,sans-serif}
  .section{scroll-margin-top:70px}
  footer{padding-bottom:24px}
  .board-switcher{position:sticky;top:58px;z-index:5;backdrop-filter:blur(16px)}
}
@media(max-width:560px){
  body{font-size:15px}
  .section{width:min(100% - 18px,1120px);padding:42px 0}
  .hero{padding-top:28px}.hero-copy{padding:0 6px}h1{font-size:clamp(34px,10vw,42px);line-height:1.14}.lead{font-size:14px;line-height:1.75;margin-bottom:24px}
  .portrait-stage{width:100%;padding:10px 4px 16px}.frame{padding:9px;border-radius:7px}.mat{padding:8px}.photo-caption{padding:0 14px;font-size:13px;line-height:1.7}
  .photo-lock{padding:12px}.lock-icon{font-size:28px;margin-bottom:5px}.photo-lock strong{font-size:16px}.photo-lock p{margin:5px 0 10px;font-size:12px}.photo-lock form{width:min(92%,260px);gap:7px}.photo-lock input,.photo-lock button{min-height:44px}
  .section-heading{margin-bottom:22px}.section-heading h2{font-size:29px}.section-heading>p,.section-heading div>p{font-size:13px;line-height:1.7}
  .card{border-radius:20px}
  .today-grid{gap:12px}.calendar-card{padding:14px}.calendar-head{margin-bottom:12px}.calendar-head button{width:44px;height:44px}.calendar-head strong{font-size:18px}
  .weekdays,.calendar-grid{gap:2px}.calendar-day{min-height:44px;border-radius:10px}.calendar-day .solar-day{font-size:13px}.calendar-day .lunar-day{font-size:8px}.selected-day-detail{margin-top:12px;padding:11px;font-size:12px}
  .weather-stack{gap:10px}.weather-card{padding:18px 19px}.weather-top{align-items:center}.city-cn{font-size:19px}.weather-icon{font-size:32px}.temp{font-size:42px}.weather-meta{gap:6px}.weather-meta span{padding:6px 8px}
  .family-grid{gap:12px}.profile-card,.message-card{padding:16px}.profile-row{align-items:flex-start}.avatar.big{width:58px;height:58px;font-size:28px}.avatar-picker{overflow-x:auto;flex-wrap:nowrap;padding:3px 2px 8px;margin:12px 0 18px}.avatar-choice{flex:0 0 42px;width:42px;height:42px}
  .message-card{min-height:360px}.message-list{max-height:430px}.message-form textarea{min-height:82px}.primary-button,.tool-button{min-height:44px}
  .board-section{width:100%;padding-left:9px;padding-right:9px}.board-heading{padding:0 4px}.board-shell{border-radius:18px}
  .board-switcher{top:58px;padding:10px 12px}.board-switcher label{width:100%;gap:8px}.board-switcher select{height:44px;min-width:0;max-width:none;flex:1}.board-switcher .primary-button{width:100%}
  .board-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px 12px}.board-toolbar label{min-height:44px;justify-content:center;border:1px solid var(--line);border-radius:12px;background:#fffaf3;padding:7px}.board-toolbar input[type=range]{width:min(36vw,150px)}.board-toolbar .tool-button{width:100%}.board-toolbar .danger{grid-column:1/-1;margin-left:0}
  .canvas-wrap{height:62svh;min-height:430px}.board-empty{font-size:22px}.board-tip{padding:10px 12px;line-height:1.5}
}

/* v8 mobile message wall overflow fix */
.family-grid,.message-card,.message-list,.message-form,.message-item,.message-item>div{min-width:0;max-width:100%}
.message-card{overflow:hidden}
.message-list{width:100%;overflow-x:hidden;overflow-y:auto}
.message-item{width:100%;grid-template-columns:38px minmax(0,1fr)}
.message-item>div{overflow:hidden}
.message-head{min-width:0;align-items:flex-start}
.message-head strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.message-head time{flex:0 0 auto;white-space:nowrap}
.message-text{max-width:100%;overflow-wrap:anywhere;word-break:break-word}
.message-form,.message-form textarea{width:100%;max-width:100%}
@media(max-width:560px){
  #messages.section{width:calc(100% - 18px);overflow:hidden}
  .family-grid{width:100%;min-width:0}
  .message-card{width:100%;padding:14px}
  .message-list{padding-right:0}
  .message-item{grid-template-columns:34px minmax(0,1fr);gap:9px;padding:11px}
  .message-item .avatar{width:34px;height:34px;font-size:18px}
  .message-head{gap:8px}
  .message-head time{font-size:10px}
  .message-form>div{gap:10px}
  .message-form .primary-button{flex:0 0 auto;white-space:nowrap}
}

/* v9 PWA install guidance */
.install-app-btn{margin-left:auto;border:1px solid var(--line);border-radius:999px;padding:9px 13px;background:#fff8ef;color:var(--terracotta-dark);cursor:pointer;font:600 12px/1 system-ui,sans-serif}
.install-sheet[hidden]{display:none}
.install-sheet{position:fixed;inset:0;z-index:100;display:grid;place-items:end center}
.install-sheet-backdrop{position:absolute;inset:0;border:0;background:rgba(42,27,20,.42);backdrop-filter:blur(4px)}
.install-sheet-card{position:relative;z-index:1;width:min(560px,calc(100% - 20px));margin:10px;padding:22px;border:1px solid rgba(105,72,50,.14);border-radius:26px;background:#fffaf3;box-shadow:0 30px 80px rgba(55,34,23,.28);color:var(--ink)}
.install-sheet-handle{width:42px;height:5px;border-radius:99px;background:#d9c6b5;margin:-8px auto 15px}
.install-sheet-close{position:absolute;right:14px;top:12px;width:36px;height:36px;border:0;border-radius:50%;background:#f1e2d2;color:var(--ink);font-size:24px;cursor:pointer}
.install-sheet-icon{font-size:40px;margin-bottom:8px}.install-sheet-card h2{font-size:24px;margin:0 44px 12px 0}.install-copy,.install-note{color:var(--muted);line-height:1.7}
.ios-install-steps ol{margin:12px 0 0;padding-left:22px}.ios-install-steps li{margin:10px 0;line-height:1.6}.share-glyph{display:inline-grid;place-items:center;width:26px;height:26px;border:1px solid var(--line);border-radius:7px;background:#fff;font-weight:700}
.install-sheet-actions{display:flex;gap:10px;margin-top:18px}.install-sheet-actions>*{flex:1}
@media(max-width:820px){.topbar .install-app-btn{display:none}}
@media(max-width:560px){
  .install-sheet{place-items:end stretch}
  .install-sheet-card{width:calc(100% - 12px);margin:6px;border-radius:24px 24px 18px 18px;padding:20px 18px calc(18px + env(safe-area-inset-bottom))}
  .install-sheet-card h2{font-size:21px}.install-sheet-actions{position:sticky;bottom:0}
}

/* v10 mobile message controls: never clip */
@media(max-width:560px){
  #messages.section{width:calc(100% - 16px);overflow:visible}
  .family-grid{display:block;width:100%;max-width:100%;min-width:0}
  .profile-card,.message-card{width:100%;max-width:100%;min-width:0;overflow:visible}
  .message-card{margin-top:12px;padding:14px}
  .profile-row{display:grid;grid-template-columns:58px minmax(0,1fr);gap:12px;width:100%}
  .profile-row>div:last-child{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;width:100%;min-width:0}
  .profile-row input,#save-profile{width:100%;max-width:100%;min-width:0}
  #save-profile{min-height:44px}
  .message-list{width:100%;max-width:100%;min-width:0;overflow-x:hidden}
  .message-form{width:100%;max-width:100%;min-width:0;overflow:visible}
  .message-form textarea{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
  .message-form>div{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
    width:100%;
    max-width:100%;
    min-width:0;
    align-items:stretch;
  }
  .message-form #message-count{display:block;width:100%;text-align:right}
  .message-form .primary-button{
    display:block;
    width:100%;
    max-width:100%;
    min-width:0;
    min-height:46px;
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
    line-height:1.25;
    padding:11px 14px;
  }
}

/* Visible outage state: never mistake a storage failure for empty family data. */
.family-sync-warning{margin:0 0 20px;padding:14px 18px;border:1px solid #e0c09b;border-radius:12px;background:#fff8ed;color:#724c27;font-size:15px;line-height:1.6}
.family-sync-warning[hidden]{display:none!important}
.message-form button:disabled,.board-switcher button:disabled{opacity:.55;cursor:not-allowed}
