/* Additions to the mock's styling for the real app */
.env-ribbon{background:#A8741A;color:#fff;text-align:center;font-size:12.5px;padding:4px 8px;letter-spacing:.04em}
.inline{display:inline}
.mb16{margin-bottom:16px}
.ferr{color:var(--red);font-size:12.5px;margin-top:4px}
.auth-wrap{display:flex;justify-content:center;padding:48px 16px 80px}
.auth-card{width:100%;max-width:440px}
.qr{display:flex;justify-content:center;margin:16px 0 8px}
.qr{background:#fff;border-radius:8px}
.qr svg{display:block;width:240px;height:240px;max-width:100%;shape-rendering:crispEdges}
code.key{display:inline-block;margin-top:6px;font-size:14px;letter-spacing:.08em;background:var(--sand3);padding:6px 10px;border-radius:8px;word-break:break-all}
.codes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:16px}
.codes code{background:var(--sand3);border:1px solid var(--line);border-radius:10px;padding:8px;text-align:center;font-size:15px;letter-spacing:.1em}
.temp-pw{font-family:Consolas,Menlo,monospace;font-size:26px;letter-spacing:.06em;text-align:center;background:var(--sand3);border:1px dashed var(--sand);border-radius:14px;padding:18px;margin:16px 0}
.numsteps p{display:flex;gap:10px;align-items:flex-start;margin:0 0 8px;line-height:1.5}
.numsteps .n{flex:none;width:22px;height:22px;border-radius:50%;background:var(--sand2);color:var(--olive-d);display:inline-grid;place-items:center;font-size:12px;font-weight:600}
.coming{padding-left:18px;line-height:1.7;margin-bottom:0}
.kpi-n{font-family:var(--serif);font-size:36px;margin:8px 0 0;color:var(--olive-d)}
.filters{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.filters .inp{max-width:340px}
.linklike{background:none;border:0;padding:7px 10px;font:inherit;font-size:14px;color:inherit;cursor:pointer;text-align:left;width:100%;border-radius:10px}
.linklike:hover{background:rgba(255,255,255,.12)}
.foot-mini{padding:28px 0;color:var(--muted);font-size:13px;border-top:1px solid var(--line);margin-top:40px}
.hero-art .arch{width:100%;max-width:460px;border-radius:240px 240px 24px 24px;object-fit:cover;aspect-ratio:4/5;display:block;margin-left:auto}
.a-burger{display:none}
.m-nav .nl{padding:8px 12px;border-radius:999px;color:var(--ink);font-size:14.5px;text-decoration:none}
.m-main{padding:26px 0 110px}
@media (max-width: 900px){
  .a-shell{grid-template-columns:minmax(0,1fr)}
  .side{position:fixed;left:-280px;width:260px;z-index:80;transition:left .2s;height:100vh}
  .side.open{left:0}
  .a-burger{display:inline-grid;place-items:center;border:0;background:var(--sand2);width:38px;height:38px;border-radius:10px;cursor:pointer}
  .hero .in{grid-template-columns:1fr}
  .hero-art{display:none}
  .bottom-nav{display:flex}
}
@media (max-width: 640px){ .fgrid{grid-template-columns:minmax(0,1fr)} .g2{grid-template-columns:minmax(0,1fr)} .codes{grid-template-columns:1fr 1fr} }
/* Stage 2: forms with sections, guide pop-ups, thumbnails */
[data-if][hidden]{display:none!important}
dialog.dlg{padding:0;border:0;color:inherit;width:calc(100% - 32px)}
dialog.dlg::backdrop{background:rgba(70,56,40,.42);backdrop-filter:blur(3px)}
.modal-f{border-top:1px solid var(--line)}
.thumb{width:46px;height:46px;object-fit:cover;border-radius:10px;display:block}
.thumb-lg{width:120px;height:90px;object-fit:cover;border-radius:12px;display:block}
.checks{display:flex;flex-wrap:wrap;gap:8px 18px;margin-top:4px}
.form-wrap{display:grid;grid-template-columns:minmax(0,920px) minmax(0,300px);gap:18px;align-items:start}
.form-wrap>form:only-child{grid-column:1/-1;max-width:920px}
.preview-card .ticks{list-style:none;padding:0;margin:10px 0 0}
.preview-card .ticks li{padding:5px 0 5px 24px;position:relative;font-size:14px;color:#5E564F}
.preview-card .ticks li:before{content:"✓";position:absolute;left:2px;color:var(--terra)}
.tab.dis{opacity:.5;cursor:not-allowed}
.matrix input.na{width:120px;font-size:13px;font-family:var(--sans);font-weight:400}
.mb8{margin-bottom:8px}
td.r,th.r{text-align:right}
@media (max-width: 1100px){ .form-wrap{grid-template-columns:minmax(0,1fr)} }

/* Stage 4: public pages */
.subnav .sn-name{flex:none}
.studio-mini{cursor:pointer}
@media (max-width: 640px){ .subnav .sn-area,.subnav .sn-home{display:none} .subnav .in{gap:10px} }

/* Notification bell: the app uses a link (the mock used a button), so centre the icon and keep the text colour. */
a.bell{display:inline-grid;place-items:center;color:var(--olive-d);text-decoration:none}
a.bell svg{display:block}
a.bell i{text-align:center;box-shadow:0 0 0 2px var(--paper)}
body:not(.fe) a.bell{color:#2A2521}
.m-nav .av{width:38px;height:38px}
/* Studio bar: Studio home and Change studio are real buttons (owner asked for them to be easier to spot). */
.subnav .in{gap:10px} .subnav .btn.sm{padding:6px 14px;min-height:34px;flex:none} .subnav .btn svg{flex:none}
@media (max-width: 420px){ .subnav .sn-name{flex:1 1 auto;min-width:0} .subnav .sn-name .b{overflow:hidden;text-overflow:ellipsis;min-width:0} .subnav .grow{display:none} }
/* Member profile menu: the round initial opens a small menu (owner request 2026-11-24). */
.pmenu{position:relative} .pmenu summary{list-style:none;cursor:pointer;user-select:none} .pmenu summary::-webkit-details-marker{display:none}
.pmenu[open] summary{box-shadow:0 0 0 3px rgba(207,115,85,.25)}
.pm-list{position:absolute;right:0;top:calc(100% + 10px);min-width:250px;background:var(--paper);border:1px solid var(--line);border-radius:16px;box-shadow:var(--sh2);padding:8px;z-index:70;display:flex;flex-direction:column}
.pm-head{padding:8px 12px 10px;border-bottom:1px solid var(--line);margin-bottom:6px;display:flex;flex-direction:column;gap:2px;overflow-wrap:anywhere}
.pm-head b{color:var(--olive-d);font-weight:600}
.pm-list a,.pm-list .pm-out{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;color:#3E352D;text-decoration:none;font-size:14.5px;background:none;border:0;width:100%;text-align:left;cursor:pointer;font-family:inherit}
.pm-list a:hover,.pm-list .pm-out:hover{background:var(--cream)} .pm-list svg{color:var(--olive);flex:none}
.pm-list form{margin:0;border-top:1px solid var(--line);margin-top:6px;padding-top:6px} .pm-list .pm-out{color:var(--red)} .pm-list .pm-out svg{color:var(--red)}
@media (prefers-reduced-motion: no-preference){ .pmenu[open] .pm-list{animation:pm-in .25s cubic-bezier(.2,.7,.2,1)} @keyframes pm-in{from{opacity:0;transform:translateY(-6px) scale(.98)}} }
/* Studio bar buttons share one look, so neither reads as "selected"; the footer install button is a full button. */
.subnav .btn.line{background:#fff;border-color:#D8C7AB;color:var(--olive-d)} .subnav .btn.line:hover{background:var(--cream);border-color:var(--olive)}
.install-btn[hidden]{display:none} .install-btn{box-shadow:var(--sh)}
/* Member header on phones: smaller logo and studio name with room between the lines (owner request 2026-11-24). */
@media (max-width: 640px){
  .m-nav .in{height:auto;min-height:64px;padding-top:10px;padding-bottom:10px;gap:12px}
  .m-nav .brand{gap:12px;min-width:0;flex:1 1 auto}
  .m-nav .brand img{width:40px;height:40px;border-radius:11px}
  .m-nav .brand>span{min-width:0;display:flex;flex-direction:column;gap:5px}
  .m-nav .brand>span br{display:none}
  .m-nav .brand .t{font-size:14.5px!important;letter-spacing:.09em;line-height:1.3;font-weight:600}
  .m-nav .brand .s{display:block!important;font-size:9.5px;letter-spacing:.24em;line-height:1}
  .m-nav .grow{display:none}
}
/* Public header at in-between widths (about 1000 to 1200 px): the logo keeps its width and the small line under it
   is hidden, so it never runs under the Home button. */
.nav .brand{flex:none}
@media (min-width:1001px) and (max-width:1200px){ .nav .brand .s{display:none} .nav .navlinks a.nl{padding:8px 10px}
  /* A longer brand name ("Surya Group Malaysia") wraps onto two lines here so the menu keeps its room. */
  body.fe .nav .brand .t{font-size:19px;letter-spacing:.06em;line-height:1.1;display:inline-block;max-width:8.2em} }
/* Keyboard focus on clickable table rows (see app.js). */
.tbl tr.click:focus-visible{outline:2px solid var(--olive);outline-offset:-2px}
.tbl tr.click:focus-visible td{background:#F3E9D6}

/* ---- Phone layout pass (2026-11-25): easier tapping, no zoom on iPhone, readable small labels. ---- */
.burger{flex:none}
.back-link{display:inline-block;margin-bottom:10px}
.fe .ring .mid b.long{font-size:20px}
@media (max-width:760px){
  /* iPhone zooms into any field with text under 16px: filters and the credit matrix too. */
  .filters .inp,.matrix input,.matrix input.na{font-size:16px}
  .row.sp>form.filters{flex:1 1 100%}
  .row.sp>form.filters .inp{flex:1 1 0;min-width:0;max-width:none}
  /* Timetable day strip: labels no smaller than 11px. */
  .day .w{font-size:11px;letter-spacing:.04em} .day .tdy{font-size:11px;letter-spacing:.04em}
  /* Footer links: each one a comfortable tap target. */
  .footer .col a{display:block;padding:7px 0}
  .footer .col{gap:0!important}
  /* Small text links on public pages. */
  .fe .linkbtn,.fe .br-list li a{display:inline-flex;align-items:center;min-height:32px}
  .fe .hero-show .hs-dots button{width:34px;height:34px}
  .subnav .sn-name{min-height:36px}
  .fe a.nm{display:inline-block;padding:4px 0}
  .studio-mini button.badge{min-height:32px;padding:4px 12px}
  .fe .ttl a,.fe .inst-week a{min-height:32px;display:inline-flex;align-items:center}
  .fe .row.sp.sm>a{min-height:32px;display:inline-flex;align-items:center;padding:0 4px}
  .m-nav .brand .s{font-size:10.5px!important;letter-spacing:.2em}
}
/* Community articles on phones: one row to swipe through instead of two narrow columns. */
@media (max-width:560px){
  .fe .art-row{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding:0 16px;gap:14px;margin:0 -16px;padding:4px 16px 12px;scrollbar-width:none}
  .fe .art-row::-webkit-scrollbar{display:none}
  .fe .art-row>.article-card{flex:0 0 80%;scroll-snap-align:start}
}
/* Public header on phones (test run 2026-11-25): a longer brand name ("Surya Group Malaysia") pushed the menu button
   past the screen edge. The brand may now shrink and wrap so the menu button always fits. */
@media (max-width:1000px){
  .nav .brand{flex:0 1 auto;min-width:0} .nav .brand>span{min-width:0;display:block}
  .nav .brand .s{display:block;overflow:hidden;text-overflow:ellipsis}
}
@media (max-width:520px){
  body.fe .nav .brand .t{font-size:18px;letter-spacing:.06em;line-height:1.15} body.fe .nav .brand .s{font-size:9px;letter-spacing:.2em;margin-top:3px}
  .nav .brand>span br{display:none}
}
/* Terms and Conditions (page and pop-up). */
.terms h3{font-size:20px;margin:26px 0 8px} .terms h4{font-size:15px;margin:16px 0 6px;font-family:inherit;font-weight:600}
.terms p,.terms li{font-size:14.5px;line-height:1.65} .terms ul{padding-left:20px}
.terms-dlg .terms>.eyebrow,.terms-dlg .terms>h2{display:none} .terms-dlg .terms>h3:first-of-type{margin-top:4px}
.terms-dlg .modal-b{max-height:70vh;overflow:auto;scroll-padding-top:8px}
[data-show-any][hidden],[data-show-all][hidden]{display:none!important}
/* Studio page & contact editor: live preview beside the form (owner decision 2026-11-26). */
.pv-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,44%);gap:20px;align-items:start}
.pv-layout>form{max-width:none!important}
.pv-pane{position:sticky;top:16px;height:calc(100vh - 32px);min-height:480px;display:flex;flex-direction:column;background:var(--paper);border:1px solid var(--line);border-radius:18px;overflow:hidden;box-shadow:var(--sh)}
.pv-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid var(--line)}
.pv-stage{position:relative;flex:1;overflow:hidden;background:#EFE6D6}
.pv-stage iframe{position:absolute;top:0;left:0;border:0;transform-origin:0 0;background:var(--cream)}
.seg{display:inline-flex;border:1px solid var(--line);border-radius:999px;padding:2px;background:var(--sand3)}
.seg button{border:0;background:transparent;border-radius:999px;padding:5px 11px;font:inherit;font-size:12.5px;cursor:pointer;color:var(--muted)}
.seg button.on{background:var(--paper);color:var(--olive-d);font-weight:600;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.pv-close,.pv-open{display:none}
@media (max-width:1100px){
  .pv-layout{grid-template-columns:minmax(0,1fr)}
  .pv-pane{display:none;position:fixed;inset:0;top:0;height:100%;min-height:0;border-radius:0;z-index:95}
  .pv-pane.open{display:flex} .pv-close{display:inline-grid} .pv-open{display:inline-flex}
  body.pv-lock{overflow:hidden}
}
/* Inside the preview frame: the part of the page that belongs to the field being edited. */
.pv-focus{outline:3px dashed var(--sun)!important;outline-offset:4px;border-radius:6px;transition:outline-color .2s}
