/* Family phone surfaces. Screen only: tablet, landscape and print keep their layouts. */
.fm-home-art,.fm-home-links,.fm-record-icon,.fc-art,.fc-brand,.fm-reader-back{display:none}
@media screen and (max-width:600px) and (orientation:portrait){
  body.sb-on{color:#223e32;background:#f4f7f4}
  body.sb-on #back{opacity:.13}
  body.sb-on #stage{padding:76px 14px 104px!important}
  body.sb-on #top{background:#f8faf7ee;backdrop-filter:blur(18px);gap:8px}
  body.sb-on #tb-help,body.sb-on #tb-acct{display:none}
  body.sb-on #fm-kid:not([hidden]){max-width:calc(100vw - 100px);min-height:42px;border:0;background:#eaf2ea;font-weight:700}
  body.sb-on .sheet{border:1px solid #e4eae2;border-radius:24px!important;box-shadow:0 9px 28px #294a3210!important}
  body.sb-on #b-tx{font-size:24px!important;line-height:1.4!important;letter-spacing:-.7px}
  body.sb-on #b-sub{font-size:14px!important;line-height:1.75!important;color:#778a7c}
  body.sb-on .bubble{padding:24px 22px 18px!important}
  body.sb-on #slot>.panel{padding:20px!important}
  body.sb-on .ch{font-size:16px;box-shadow:none!important;border-radius:15px!important;min-height:50px}
  body.sb-on .ch.go{background:linear-gradient(110deg,#20d885,#0cb96a)!important;box-shadow:0 5px 14px #0da76c20!important}
  body.sb-on .disc{padding:14px 20px!important;font-size:10px!important;color:#8a998c}
  body.ff-home #sheet{background:transparent!important;border:0;box-shadow:none!important;overflow:visible}
  body.ff-home .bubble{padding:12px 6px 22px!important;background:transparent;box-shadow:none;border:0}
  body.ff-home #slot>.panel{padding:0!important;background:transparent}
  body.ff-home .ff-steps{padding:0 4px;margin-bottom:20px;gap:3px}
  body.ff-home .ff-steps li{font-size:10px;gap:4px;white-space:nowrap}
  body.ff-home .ff-kid{position:relative;padding:172px 22px 22px!important;overflow:hidden;border:1px solid #dce9db;border-radius:24px!important;background:#fff!important;box-shadow:0 10px 28px #344a3510}
  .fm-home-art{display:block;position:absolute;inset:0 0 auto;height:154px;background:radial-gradient(ellipse at 50% 95%,#fffdf2,#e4f3e6);overflow:hidden}
  .fm-home-art img{position:absolute;height:215px;width:200px;object-fit:contain;top:18px;left:calc(50% - 100px);filter:drop-shadow(0 8px 12px #28634212);mask-image:linear-gradient(#000 54%,transparent 68%)}
  .fm-home-art span{position:absolute;left:18px;top:16px;font-size:10px;letter-spacing:1.4px;color:#4c7960;font-weight:700}
  body.ff-home .ff-kid-head strong{font-size:23px;letter-spacing:-.6px}
  body.ff-home .ff-kid p{font-size:14px;line-height:1.7;margin:10px 0 18px}
  body.ff-home .ff-note{font-size:12px;line-height:1.8;padding:0 8px;text-align:center}
  .fm-home-links{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0 0}
  .fm-home-links button{padding:16px 10px;min-height:64px;border:1px solid #e0e9df;border-radius:17px;background:#ffffffbd;color:#426a50;font-family:inherit;font-size:13px;font-weight:600;cursor:pointer}
  body.ff-home #k-add{display:block;margin:8px auto 0;min-height:44px}
  #fm-tabs{height:calc(70px + env(safe-area-inset-bottom));box-shadow:0 -8px 25px #31583608;padding-top:6px}
  #fm-tabs button[aria-current=page]{background:transparent;color:#13875b}
  #fm-tabs button[aria-current=page] svg{stroke-width:2.3}
  .fm-record-filters{display:flex;gap:6px;margin:0 0 18px;overflow:auto;scrollbar-width:none}
  .fm-record-filters button{flex:1;white-space:nowrap;border:1px solid #e1e8e0;background:white;color:#6e8274;min-height:40px;padding:8px 10px;border-radius:12px;font-family:inherit;font-size:12px;font-weight:600}
  .fm-record-filters button[aria-pressed=true]{color:#fff;background:#277b56;border-color:#277b56}
  .fm-records .fh-row{gap:12px;margin:0 0 10px;padding:16px 12px;border:1px solid #e4eae2;background:#fff;border-radius:16px;min-height:86px}
  .fm-records .fh-row strong{font-size:14px;line-height:1.6;white-space:normal;overflow-wrap:anywhere;color:#294f3a;font-weight:700}
  .fm-records .fh-row small{font-size:11px;margin-top:4px;white-space:normal;line-height:1.7}
  .fm-record-icon{display:grid;place-items:center;width:40px;height:44px;flex:none;border-radius:12px;background:#eef4e9;color:#568066}
  .fm-record-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.5}
  .fm-record-icon.letter{background:#fff1e8;color:#b38766}
  .fm-record-icon.final{background:#eef0fb;color:#828ab0}
  .fm-record-count{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:#819284;margin-bottom:12px}
  .fm-record-count button,.fm-reader-back{border:0;background:none;color:#46745a;font-family:inherit;font-size:12px;font-weight:600;padding:10px 0;min-height:40px;cursor:pointer}
  .fm-account{gap:0;border:1px solid #e4eae2;border-radius:18px;overflow:hidden;background:white}
  .fm-account button{border:0;border-bottom:1px solid #edf1e9;border-radius:0;background:white;padding:18px;font-size:14px;position:relative;padding-right:30px}
  .fm-account button:after{content:'›';position:absolute;right:16px;top:17px;color:#9aab9b;font-size:20px}
  .fm-account button:last-child{border-bottom:0;color:#ba5b60}
  .fm-account small{font-size:11px;line-height:1.7}
  body.fh-reading #stage{padding:66px 0 86px!important}
  body.fh-reading #sheet{border:0!important;border-radius:0!important;box-shadow:none!important}
  body.fh-reading #slot>.panel{padding:0!important}
  .fh-reader>header{padding:8px 18px 10px!important;gap:10px;flex-wrap:wrap}
  .fm-reader-back{display:block;flex:0 0 100%;text-align:left}
  .fh-reader>header h2{font-size:17px!important}
  .fh-reader #fh-content{padding:0 10px}
  .fh-frame{height:calc(100dvh - 238px);min-height:380px}
  .fd-tools{position:sticky;top:58px;z-index:8;display:flex;gap:8px;background:#f2f6efee;backdrop-filter:blur(14px);padding:10px 4px;margin-bottom:5px}
  .fd-tools>button{flex:1;min-height:44px;padding:10px 8px;border-radius:13px;font-size:12px;white-space:nowrap}
  .fd-tools>span{display:none}.fd-status{font-size:11px;text-align:center}
  .fd-paper{border-radius:20px;margin-bottom:16px;box-shadow:0 8px 24px #30473109}
  .fd-cover{padding:192px 24px 22px;min-height:0;display:block}
  .fd-scene{height:194px;object-position:65% center}
  .fd-cover:after{top:145px;height:51px;bottom:auto}
  .fd-logo{width:96px;left:22px;top:20px}
  .fd-cover-copy{width:100%;position:static}.fd-eyebrow{font-size:9px!important;letter-spacing:1px;margin:0 0 12px!important}
  .fd-cover h1{font-size:28px;line-height:1.4;max-width:none;letter-spacing:-.8px}.fd-cover h1 em{font-size:23px;line-height:1.5;letter-spacing:-.6px}
  .fd-letter-body{padding:8px 24px 28px}.fd-letter-body>p{font-size:15px;line-height:1.95;word-break:normal;overflow-wrap:anywhere;margin-bottom:22px}
  .fd-letter-body>p.fd-greeting{font-size:18px;margin:5px 0 22px;line-height:1.7}
  .fd-sign{margin-top:24px;padding-top:18px;border-top:1px solid #e7ecdf}.fd-sign b{font-size:21px}
  .fd-footer{font-size:10px;line-height:1.8;padding:19px 23px}
  .fd-week-body{padding:0 24px 12px}.fd-summary p{font-size:13px;line-height:1.8}
  .fd-section{display:block;padding:24px 0}.fd-number{width:32px;height:30px;font-size:12px;border-radius:9px;margin-bottom:12px}
  .fd-section h2{font-size:19px!important;line-height:1.5;margin:0 0 13px}.fd-section p{font-size:14px;line-height:1.95;word-break:normal;overflow-wrap:anywhere}
  body.fd-weekly{padding:0 12px 30px!important}body.fd-weekly .fd-tools,body.fd-weekly-s2 .fd-tools{top:0}
  body.fd-weekly .fam-back,body.fd-weekly-s2 .fam-back{position:static;margin:8px 0;padding:8px 5px;min-height:44px;background:none;box-shadow:none;font-size:12px}
  body.fd-weekly-s2{padding:0 12px 30px!important;display:flex!important;flex-direction:column;align-items:stretch!important;height:auto!important;min-height:100dvh;overflow:auto!important}
  body.fd-weekly-s2>.fam-back{order:-1;align-self:flex-start}
  .fd-s2-top{margin:0 0 14px;width:100%;flex:none}
  body.fd-weekly-s2>.sheet{width:100%!important;height:auto!important;min-height:0!important;max-width:100%!important;margin:14px 0!important;padding:22px!important;zoom:1!important;transform:none!important;overflow:visible!important;border-radius:20px;border:1px solid #e0e8de}
  body.fd-weekly-s2 .page-body{height:auto!important;min-height:0!important;overflow:visible!important;display:block}
  body.fd-weekly-s2 .report-header{display:flex;flex-direction:column;gap:12px;margin-bottom:20px}
  body.fd-weekly-s2 .report-title{font-size:23px!important;line-height:1.45!important;letter-spacing:-.6px}
  body.fd-weekly-s2 .child-card{min-width:0;width:100%;font-size:12px;text-align:left}
  body.fd-weekly-s2 .section{padding:20px 0!important;margin:0!important;break-inside:auto}
  body.fd-weekly-s2 .section-heading{font-size:18px!important;line-height:1.5!important}
  body.fd-weekly-s2 :is(.w1-dual-analysis,.w1-relation-columns,.w1-parent-view,.diagnostic-grid,.w2-dual-analysis,.w2-relation-columns,.w3-dual-analysis,.two-col,.cols-2,.narrative-grid){grid-template-columns:minmax(0,1fr)!important}
  body.fd-weekly-s2 :is(.fact-grid,.w1-time-strip){display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px;min-width:0}
  body.fd-weekly-s2 .w1-time-strip>i{display:none}
  body.fd-weekly-s2 :is(p,[data-text],[data-slot]){overflow-wrap:anywhere;word-break:normal}
  body.fd-weekly-s2 :is(.narrative,.narrative p,.w1-analysis-card p,.w1-parent-view p,.w1-relation-box p,.body-copy,.text){font-size:14px!important;line-height:1.9!important}
  body.fd-weekly-s2 .report-footer{position:static;margin-top:22px;padding-top:12px;font-size:10px}
  body.fd-weekly-s2 img,body.fd-weekly-s2 svg{max-width:100%}
  body.fd-weekly-s2>.sheet{background:#fff!important;color:#304a3b}
  body.fd-weekly-s2 .sheet :is(div,article,section,aside){grid-template-columns:minmax(0,1fr)!important;min-width:0!important;min-height:0!important;max-width:100%!important}
  body.fd-weekly-s2 .sheet :is(p,[data-slot]){font-size:14px!important;line-height:1.85!important}
  body.fd-weekly-s2 .sheet :is(h3,h4){font-size:16px!important;line-height:1.6!important}
  body.fd-weekly-s2 .sheet .section{background:transparent!important;overflow:visible}
  body.fd-weekly-s2 .sheet [class*=time-strip]{grid-template-columns:1fr 1fr!important;font-size:11px}
  body.fd-weekly-s2 .sheet .w3-trophy-lineup{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  body.fd-weekly-s2 .sheet .w3-chart-columns{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.fd-weekly-s2 .sheet :is(.brand-row,.report-footer) span{font-size:10px!important}
  body.fam-phone-report{--pri:#277c58;--pri-d:#24513e;--pri-s:#eef6ef;--pri-l:#d6e6d9;--bg:#f3f6f1;--line:#e1e9df;--wash:#f7faf4}
  body.fam-phone-report .fixedhead{background:#f8faf7f5;box-shadow:none;border-bottom:1px solid #dce7dd}
  body.fam-phone-report .wrap{padding:0 12px 40px}
  body.fam-phone-report .cover{padding:28px 22px;background:linear-gradient(150deg,#f5faee,#fffdf8);border-color:#dae7d8;box-shadow:none}
  body.fam-phone-report .cover h1{font-size:27px;line-height:1.45}
  body.fam-phone-report .cover-child strong{font-size:25px}
  body.fam-phone-report .cover-child{min-height:250px}
  body.fam-phone-report .cover-trophy{height:224px!important}
  body.fam-phone-report .cover-child:not(:has(img[src])){min-height:108px}
  body.fam-phone-report .cover-child:not(:has(img[src])):before,body.fam-phone-report .cover-child:not(:has(img[src])):after{display:none}
  body.fam-phone-report .toc-grid a{font-size:12px;line-height:1.6;min-height:62px;padding:10px;gap:8px}
  body.fam-phone-report .toc-grid a b{width:24px;height:24px;font-size:11px;flex:none}
  body.fam-phone-report .ch{padding:24px 22px;border-radius:21px;box-shadow:none;margin-top:14px}
  body.fam-phone-report .ch-head h2{font-size:21px;line-height:1.45}
  body.fam-phone-report .mirror{font-size:15px;line-height:1.9;padding:18px;background:#f5f8ef;border-color:#e0e9d8}
  body.fam-phone-report .type-box{gap:12px;padding:16px 12px}.fam-phone-report .type-img{max-width:32%;height:auto;max-height:140px;object-fit:contain}
  body.fam-phone-report .type-name{font-size:23px}.fam-phone-report .headline{font-size:20px}
  body.fam-phone-report .lead{font-size:15px;line-height:1.9}
  body.fam-phone-report .topbar-in .fam-back{font-size:0;width:36px;padding:0}.fam-phone-report .topbar-in .fam-back:before{content:'←';font-size:22px}
  body.fam-phone-report .topbar-in .fam-back{flex:none;justify-content:center}
  body.fam-child-phone main{padding:24px 22px 30px;align-items:center;background:radial-gradient(ellipse at 50% 25%,#e2f2e3,transparent 65%),#f7f9f3}
  body.fam-child-phone .card{padding:0 0 14px;background:transparent;border:0;box-shadow:none;width:100%}
  .fc-brand{display:block!important;width:110px!important;height:auto!important;margin:0 auto 20px}
  .fc-art{display:block;position:relative;height:280px;margin:0 0 20px;overflow:hidden;border-radius:45% 45% 28px 28px;background:linear-gradient(#eef8e9,#e2efdf)}
  .fc-art img{width:290px;height:380px;position:absolute;left:calc(50% - 145px);top:14px;object-fit:contain;filter:drop-shadow(0 10px 14px #34582b12)}
  .fc-art[data-season=s2] img{height:320px;top:6px}
  body.fam-child-phone h1{font-size:27px;line-height:1.4;letter-spacing:-.8px;margin:0 0 12px}
  body.fam-child-phone p{font-size:14px;line-height:1.85;color:#728576;margin:0 4px 22px}
  body.fam-child-phone #start{min-height:56px;border-radius:17px;font-size:18px;box-shadow:0 7px 18px #14a66b20;background:linear-gradient(110deg,#20d784,#0dbb6b)}
  body.fam-child-phone .quiet{background:transparent;font-size:12px;margin-top:10px;color:#7b8f7e;padding:12px}
  @media(max-height:700px){.fc-art{height:210px}.fc-art img{top:0}.fc-brand{margin-bottom:12px}.fm-home-art{height:140px}body.ff-home .ff-kid{padding-top:158px!important}}
}
@media print{#fm-tabs,#fm-kid,.fm-reader-back,.fm-home-links{display:none!important}}

/* A quiet landscape for the weekly archive; letter illustrations are unchanged. */
.fd-cover-weekly .fd-scene{object-position:64% center}
@media screen and (max-width:600px) and (orientation:portrait){
 body.fam-child-phone main{position:relative;min-height:100dvh;background:#eff4e8 url('/fam/assets/child-gateway-260920.webp') 65% top/cover no-repeat;padding:28px 24px calc(22px + env(safe-area-inset-bottom));align-items:stretch}
 body.fam-child-phone .card{position:relative;min-height:calc(100dvh - 64px);padding:54dvh 0 0;display:flex;flex-direction:column;justify-content:flex-end}
 body.fam-child-phone .fc-brand{position:absolute;top:0;left:0;margin:0!important;width:112px!important;height:auto!important;filter:drop-shadow(0 3px 8px #ffffff99)}
 body.fam-child-phone h1{font-size:28px;line-height:1.4;margin:0 0 12px;text-shadow:0 2px 12px #ffffff}
 body.fam-child-phone p{font-size:14px;line-height:1.8;margin:0 2px 20px;color:#496653;text-shadow:0 1px 8px #fff}
 body.fam-child-phone #start{flex:none;margin-top:0;min-height:56px}
 body.fam-child-phone .quiet{margin:10px 0 0;color:#637d65;background:#ffffff55;border-radius:14px}
 .fd-cover-weekly{padding-top:186px;padding-bottom:26px;background:#fffdf6}
 .fd-cover-weekly .fd-scene{height:192px;object-position:76% center}
 .fd-cover-weekly:after{top:143px;height:51px}
 .fd-cover-weekly .fd-logo{background:#ffffff55;border-radius:8px;padding:3px 5px;width:106px;left:20px;top:18px}
 @media(max-height:650px){body.fam-child-phone .card{padding-top:43dvh}body.fam-child-phone h1{font-size:25px}body.fam-child-phone p{font-size:13px}}
}

/* Family weekly worlds: separate portrait/wide art; institution surfaces never load this file. */
body[data-fam-theme] #back::before,body[data-fam-theme].narrow #back::before{background-image:var(--fam-theme-wide)!important;background-position:center!important}
body[data-fam-theme] #back::after{background:linear-gradient(90deg,#f5faf755,#f5faf711)}
body[data-fam-theme].ff-home .ff-kid{background-image:linear-gradient(90deg,#fffffff5 0%,#ffffffe6 45%,#ffffff00 85%),var(--fam-theme-wide)!important;background-size:cover!important;background-position:center!important}
body.fam-child-phone #welcome{background:#edf6f3 var(--fam-theme-wide,url('/fam/assets/worlds-260920/s1-1-wide.webp')) center/cover no-repeat;justify-content:flex-start;padding:clamp(28px,6vw,110px);position:relative}
body.fam-child-phone #welcome[hidden]{display:none}
body.fam-child-phone .card{width:min(440px,42vw);padding:32px;text-align:left;background:#ffffffb8;border:1px solid #ffffffb0;backdrop-filter:blur(10px);box-shadow:0 18px 60px #354c3912;border-radius:28px}
body.fam-child-phone .fc-brand{display:block;width:126px;height:auto;margin:0 0 36px}
body.fam-child-phone h1{font-size:clamp(25px,2.5vw,36px);line-height:1.35;margin:0 0 16px;overflow-wrap:anywhere}
body.fam-child-phone p{font-size:15px;line-height:1.85;color:#496653;margin:0 0 22px}
body.fam-child-phone #start{background:linear-gradient(110deg,#20d784,#0dbb6b);color:#123d2a;box-shadow:0 7px 18px #14a66b20}
body.fam-child-phone .quiet{background:#ffffff90;font-size:12px}
.fd-cover-weekly .fd-scene{object-position:70% center}
.fd-cover-weekly .fd-cover-copy{text-shadow:0 1px 14px #ffffff}
@media screen and (max-width:600px) and (orientation:portrait){
 body[data-fam-theme] #back::before,body[data-fam-theme].narrow #back::before{background-image:var(--fam-theme-portrait)!important;background-position:center top!important}
 body[data-fam-theme].sb-on #back{opacity:.26}
 body[data-fam-theme].ff-home .ff-kid{background:#fff!important}
 body[data-fam-theme] .fm-home-art{background:var(--fam-theme-wide) 70% center/cover no-repeat}
 body[data-fam-theme] .fm-home-art img{display:none}
 body[data-fam-theme] .fm-home-art span{background:#ffffffb8;border-radius:8px;padding:6px 9px;top:12px;left:12px}
 body.fam-child-phone #welcome{background-image:var(--fam-theme-portrait,url('/fam/assets/worlds-260920/s1-1-portrait.webp'));background-position:center top;padding:28px 24px calc(22px + env(safe-area-inset-bottom));align-items:stretch}
 body.fam-child-phone .card{width:100%;min-height:calc(100dvh - 64px);padding:54dvh 0 0;background:none;border:0;backdrop-filter:none;box-shadow:none;text-align:center;display:flex;flex-direction:column;justify-content:flex-end}
 body.fam-child-phone .fc-brand{position:absolute;left:0;top:0;margin:0!important}
 body.fam-child-phone h1{font-size:28px;margin:0 0 12px}
 body.fam-child-phone p{font-size:14px;line-height:1.8;margin:0 2px 20px}
 .fd-cover-weekly .fd-scene{object-position:75% center}
 @media(max-height:650px){body.fam-child-phone .card{padding-top:43dvh}body.fam-child-phone h1{font-size:25px}body.fam-child-phone p{font-size:13px}}
}
@media screen and (orientation:landscape) and (max-height:500px){body.fam-child-phone #welcome{padding:20px 5vw}body.fam-child-phone .card{padding:22px;width:42vw}body.fam-child-phone .fc-brand{width:100px;margin-bottom:14px}body.fam-child-phone h1{font-size:24px}body.fam-child-phone p{font-size:13px;margin-bottom:8px}body.fam-child-phone button{padding:13px}}

/* Episode identity, family-only. Keep longer destination names out of the main heading. */
body.fam-child-phone p.fc-world{font-size:12px;line-height:1.6;font-weight:700;color:#3a6b59;margin:0 0 10px;letter-spacing:.2px}
.fd-cover-weekly .fd-eyebrow{line-height:1.8;letter-spacing:.5px;overflow-wrap:anywhere}
@media screen and (min-width:761px){
 body.fd-weekly-s2{flex-direction:column;align-items:center;height:auto;min-height:100vh;overflow-y:auto;zoom:1;scroll-snap-type:none}
 body.fd-weekly-s2>.fd-s2-top{width:210mm;max-width:100%;flex:none;margin:0 auto 6px}
 body.fd-weekly-s2>.sheet{flex:none}
}
@media screen and (max-width:600px) and (orientation:portrait){body.fam-child-phone p.fc-world{font-size:11px;margin-bottom:8px}body[data-fam-theme] .fm-home-art span{max-width:calc(100% - 24px);font-size:10px;letter-spacing:.2px}}
