/* Real Keeping Room Portal — warm quiet design, responsive, no nested demo iframe. */
body.ns-keeping-open{overflow:hidden}
/* The shared auth modal has inline z-index:500. Keeping Room is 2500.
   Raise only the central login modal while this route is open, without
   changing Portal One/Two or creating a second login implementation. */
body.ns-keeping-open #authModal{z-index:3600!important}
body.ns-keeping-open #authModal[style*='display: flex']{pointer-events:auto}
.ns-keeping-page{position:fixed;inset:0;z-index:2500;background:#f9f6f0;color:#3c342c;overflow:auto;overscroll-behavior:contain;font:400 15px/1.65 'Sarabun',system-ui,sans-serif}
.ns-keeping-page *{box-sizing:border-box}
.kr-wrap{max-width:1140px;margin:auto;padding:clamp(14px,4vw,45px)}
.kr-hero{background:linear-gradient(135deg,#272b34,#46413c 65%,#675544);border-radius:24px;color:#f9f0dd;padding:clamp(23px,4vw,44px);position:relative;overflow:hidden}
.kr-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}
.kr-kicker{font-size:11px;letter-spacing:.18em;color:#dec6a6;font-weight:700;margin:0 0 16px}
.kr-hero h1{font:500 clamp(36px,6vw,64px)/1.2 'Noto Serif Thai',serif;margin:0 0 12px;color:#fff2d9}
.kr-hero p{max-width:720px}
.kr-hero .kr-head p:last-child{margin:0;color:#f2e6d4}
.kr-back{background:#fff9ee;border:1px solid #ddc6a6;border-radius:12px;color:#4a3a2a;padding:10px 14px;white-space:nowrap;cursor:pointer;font:inherit}
.kr-lights{display:flex;gap:25px;justify-content:center;align-items:center;margin:22px auto 12px;padding:5px 0}
.kr-lights i{height:56px;width:12px;border-radius:4px 4px 2px 2px;display:block;background:linear-gradient(#fff5de,#be9978);position:relative;box-shadow:0 9px 22px #d7b58b23}
.kr-lights i:before{content:'';position:absolute;bottom:100%;left:50%;transform:translateX(-50%);width:15px;height:26px;border-radius:50% 50% 48% 48%;background:linear-gradient(#fff8d2,#f9c86e);filter:drop-shadow(0 0 8px #f8c26b)}
.kr-motto{margin:4px 0 0;text-align:center;font-size:14px;color:#e4d5c0}
.kr-grid{display:grid;grid-template-columns:1fr 1fr;align-items:start;gap:22px;margin:24px 0 45px}
.kr-card{background:#fffefb;border:1px solid #e4d9c9;border-radius:20px;padding:clamp(18px,3vw,30px);box-shadow:0 12px 38px #4f382b0a;min-width:0}
.kr-card h2{font:600 23px/1.4 'Noto Serif Thai',serif;margin:0 0 12px;color:#483a31}
.kr-card h3{font-size:16px;margin:27px 0 7px;color:#584332}
.kr-card p{margin:0 0 16px;color:#7d7064}
.kr-choice{display:flex!important;gap:14px;align-items:flex-start;padding:16px;margin:10px 0!important;border:1px solid #e0d3bf;border-radius:13px;background:#fcfaf6;cursor:pointer}
.kr-choice:has(input:checked){border-color:#ae8d62;background:#f6eee2}
.kr-choice input{width:18px;height:18px;accent-color:#80603a;margin:2px 0 0;flex:0 0 auto}
.kr-choice b{display:block;font-size:15px;color:#4d4034;font-weight:600}
.kr-choice small{display:block;color:#806e5b;font-size:13px}
.kr-note{margin:22px 0 0!important;font-size:13px;line-height:1.7;padding:14px;border-radius:11px;background:#f3eee6}
.kr-card label:not(.kr-choice){font-weight:600;display:block;margin:13px 0 5px}
.kr-card input:not([type=checkbox]),.kr-card textarea{display:block;width:100%;border:1px solid #d9cbb8;background:white;border-radius:11px;padding:12px 13px;font:inherit;color:#3c342c;outline-offset:3px}
.kr-card textarea{min-height:110px;resize:vertical}
.kr-primary,.kr-secondary,.kr-card article button{cursor:pointer;font:inherit;border-radius:11px;padding:11px 16px;margin:15px 0 0}
.kr-primary{background:#594739;color:#fff9ee;border:1px solid #594739;font-weight:600}
.kr-secondary{background:#f6efe4;color:#544234;border:1px solid #d9c6ac;padding:8px 12px}
.kr-card button:disabled{opacity:.6;cursor:not-allowed}
.kr-card [role=status]{margin:12px 0;color:#6b4f30;font-size:13px;overflow-wrap:anywhere}
.kr-card article{border-bottom:1px solid #e7ddd0;padding:11px 0;overflow-wrap:anywhere}
.kr-card article button{background:#f7f0e4;border:1px solid #bd9d73;margin:7px 8px 0 0;padding:7px 10px}
.kr-card article label{font-weight:400}
@media(max-width:700px){
  .kr-wrap{padding:12px}
  .kr-hero{border-radius:16px}
  .kr-head{display:block}
  .kr-back{margin-top:18px}
  .kr-grid{grid-template-columns:minmax(0,1fr);gap:14px;margin-top:14px}
  .kr-card{border-radius:16px}
}
@media(prefers-reduced-motion:reduce){.kr-lights i{filter:none}}


/* Five-section Keeping Room dashboard, based on the supplied standalone mockup. */
.ns-keeping-page{background:#faf7f2;color:#302b28;font-family:'Bai Jamjuree','Noto Sans Thai',system-ui,sans-serif}
.ns-keeping-page [hidden]{display:none!important}
.kr-shell{min-height:100%;display:grid;grid-template-columns:276px minmax(0,1fr)}
.kr-sidebar{height:100dvh;position:sticky;top:0;background:#f5f0e9;border-right:1px solid #e5ddd2;padding:32px 17px 20px;display:flex;flex-direction:column;overflow-y:auto}
.kr-brand{padding:7px 17px 29px;border-bottom:1px solid #e3dbd1}
.kr-brand small{font-size:10px;letter-spacing:.26em;color:#89715e}
.kr-brand h2{font:500 34px/1.5 'Noto Serif Thai',serif;margin:9px 0 4px;color:#39302b}
.kr-brand p{font-size:12px;line-height:1.8;color:#827369;margin:0}
.kr-nav{padding:24px 0;display:flex;flex-direction:column;gap:5px}
.kr-nav-item{display:flex;align-items:center;gap:12px;border:0;background:transparent;text-align:left;padding:12px 13px;border-radius:15px;color:#70645d;cursor:pointer;font:inherit;width:100%}
.kr-nav-item:hover{background:#eae2d8}
.kr-nav-item.is-active{background:#382f2c;color:#fff9f0;box-shadow:0 8px 20px #3c292218}
.kr-nav-item>span:last-child{min-width:0}
.kr-nav-item b{display:block;font-size:14px;font-weight:600}
.kr-nav-item small{display:block;font-size:11px;opacity:.65;font-weight:400;margin-top:2px}
.kr-nav-icon{flex:0 0 38px;width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:#eae2d8;font-size:23px;line-height:1}
.kr-nav-item.is-active .kr-nav-icon{background:#ffffff1c;color:#fff}
.kr-side-note{margin-top:auto;padding:18px;border:1px solid #e4d9ca;border-radius:16px;background:#fcfaf7;color:#78685d}
.kr-side-note span{display:block;font-size:26px}
.kr-side-note p{margin:0;font-size:12px;line-height:1.8}
.kr-sidebar .kr-back{margin:18px 0 0;width:100%;background:transparent;border:0;text-align:left;font-size:13px;color:#75695f}
.kr-main{height:100dvh;overflow-y:auto;overscroll-behavior:contain;min-width:0}
.kr-topbar{min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #ece5dd;background:#faf7f2;padding:12px clamp(18px,3.6vw,52px);font-size:12px;color:#85776c}
.kr-account{background:#f0e9e1;border:1px solid #e6dbd0;border-radius:30px;padding:6px 13px;color:#625448}
.kr-content{max-width:1100px;padding:34px clamp(18px,3.6vw,52px) 110px;margin:auto}
.kr-intro{margin-bottom:30px}
.kr-eyebrow{letter-spacing:.17em;font-weight:600;font-size:10px!important;color:#9c8270!important;margin:0 0 8px!important}
.kr-intro h1{font:500 clamp(34px,5vw,51px)/1.3 'Noto Serif Thai',serif;margin:0 0 7px}
.kr-intro>p:last-child,.kr-muted{color:#86786e!important;font-size:13px;line-height:1.85}
.kr-panel{animation:kr-reveal .2s ease}
@keyframes kr-reveal{from{opacity:.45;transform:translateY(4px)}to{opacity:1;transform:none}}
.kr-section-title{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:0 0 21px}
.kr-section-title h2{font:500 clamp(25px,3vw,34px)/1.35 'Noto Serif Thai',serif;margin:0;color:#342d2a}
.kr-section-title .kr-secondary{margin:0}
.kr-panel>.kr-muted{margin-top:-5px;margin-bottom:18px}
.kr-panel>.kr-card{margin:0 0 19px}
.kr-card{background:#fffdf9;border:1px solid #e9e1d6;border-radius:20px;padding:clamp(20px,2.7vw,30px);box-shadow:0 9px 22px #3e312206}
.kr-card h3{margin:0 0 13px;font:500 19px/1.5 'Noto Serif Thai',serif;color:#423731}
.kr-card p{color:#62564f;line-height:1.8}
.kr-night-card{background:linear-gradient(125deg,#383431,#5a4d44);border-radius:22px;color:#fff8ea;padding:clamp(24px,4vw,38px);display:flex;align-items:center;gap:25px;min-height:182px;margin-bottom:20px}
.kr-night-card h3{font:500 clamp(21px,3vw,28px)/1.4 'Noto Serif Thai',serif;margin:4px 0 8px;color:#fff9ef}
.kr-night-card p:not(.kr-eyebrow){font-size:13px;color:#eadfd1;margin:0}
.kr-night-card .kr-eyebrow{color:#d7ba8a!important}
.kr-moon{font-size:74px;line-height:1;color:#e9ca90;flex:0 0 85px;text-shadow:0 0 25px #ffd6a333}
.kr-record{border:1px solid #e9dfd4;border-radius:14px;background:#fdfaf5;padding:16px 18px;margin:12px 0}
.kr-record-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.kr-record-head b{font-size:14px;font-weight:600}
.kr-record-head strong{font-size:17px;font-weight:600}
.kr-record p{margin:8px 0 3px;font-size:13px;color:#685b52;overflow-wrap:anywhere}
.kr-record small,.kr-feed small{font-size:11px;color:#908077}
.kr-state{color:#7d6048;background:#f1e7d8;border-radius:40px;font-size:11px;padding:5px 10px}
.kr-feed{border-left:2px solid #d7c4a9;padding:2px 0 3px 17px;margin:18px 5px}
.kr-feed p{margin:4px 0 0;font-size:13px}
.kr-shortcuts{display:flex;flex-wrap:wrap;gap:10px}
.kr-shortcuts .kr-secondary{margin:0}
.kr-choice{margin:8px 0!important;display:flex;align-items:flex-start;background:#fbf8f2;border:1px solid #e8e0d5;border-radius:13px;padding:13px}
.kr-choice:has(input:checked){background:#f5ebdd;border-color:#c4aa88}
.kr-form{display:grid;gap:14px}
.kr-form label{font-size:13px;color:#514842;font-weight:600;margin:0!important}
.kr-form input:not([type=checkbox]),.kr-form textarea,.kr-form select{width:100%;display:block;border:1px solid #dcd0c3;border-radius:11px;background:#fffdfa;padding:12px;margin-top:6px;color:#332c28;font:inherit;font-size:14px}
.kr-form-two{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.kr-primary{background:#3e332f;color:#fff8ee;border-color:#3e332f;font-weight:500}
.kr-secondary{background:#f7f1e9;color:#5a493e}
.kr-quote-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-top:14px}
.kr-quote-actions label{margin:0 10px 0 0!important;font-size:13px}
.kr-quote-actions button{margin:0;border:1px solid #c8af8c;border-radius:9px;padding:8px 12px;background:#f3eadc;color:#4d4036;cursor:pointer;font:inherit;font-size:13px}
.kr-alert{padding:12px 16px;background:#f4eadd;border:1px solid #ddc4a8;border-radius:12px;color:#694d34;margin:0 0 18px;font-size:13px}
.kr-error{color:#9d3838!important}
.kr-empty{background:#faf5ed;padding:24px;border-radius:14px}
.kr-empty p{margin:0 0 12px}
.kr-empty .kr-primary{margin:0}
.kr-mobile-nav{display:none}
@media(max-width:900px){
  .kr-shell{grid-template-columns:218px minmax(0,1fr)}
  .kr-sidebar{padding:23px 10px 15px}
  .kr-brand{padding:6px 12px 20px}
  .kr-nav-item{padding:10px 8px;gap:8px}
  .kr-nav-icon{flex-basis:32px;width:32px;height:32px;font-size:18px}
}
@media(max-width:650px){
  .kr-shell{display:block}
  .kr-sidebar{display:none}
  .kr-main{height:100dvh}
  .kr-topbar{min-height:58px;padding:10px 18px}
  .kr-content{padding:26px 15px 102px}
  .kr-night-card{padding:23px 21px;gap:13px;align-items:flex-start}
  .kr-moon{font-size:44px;flex-basis:44px}
  .kr-form-two{grid-template-columns:1fr}
  .kr-record-head{align-items:flex-start}
  .kr-mobile-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;bottom:0;left:0;right:0;z-index:2800;background:#fffdf9f2;backdrop-filter:blur(14px);border-top:1px solid #e5dcd1;padding:7px 5px max(7px,env(safe-area-inset-bottom))}
  .kr-mobile-tab{background:transparent;color:#867a71;border:0;border-radius:10px;display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 1px;min-width:0;cursor:pointer;font:inherit}
  .kr-mobile-tab span{font-size:21px;line-height:1.3}
  .kr-mobile-tab b{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;font-weight:500}
  .kr-mobile-tab.is-active{background:#3e332f;color:#fffdf9}
}
@media(prefers-reduced-motion:reduce){.kr-panel{animation:none}}

.kr-mobile-back{display:none}
@media(max-width:650px){.kr-mobile-back{display:inline-flex;border:0;background:transparent;color:#68584d;font:inherit;font-size:13px;padding:6px;cursor:pointer}.kr-breadcrumb{display:none}}
