:root{
  --bg:#f4f7f6;
  --paper:#ffffff;
  --paper-soft:#f9fbfa;
  --ink:#17242b;
  --muted:#64737b;
  --faint:#8b989e;
  --line:#dfe8e5;
  --teal:#1f8f87;
  --teal-dark:#126d68;
  --coral:#d96d5f;
  --gold:#b98728;
  --indigo:#5967b0;
  --green:#2e9d72;
  --red:#c94d57;
  --shadow:0 18px 45px rgba(32,50,56,.10);
  --sidebar:232px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  min-width:320px;
  color:var(--ink);
  background:
    linear-gradient(180deg,#f7faf9 0%,#eef6f3 46%,#f5f7f4 100%);
  font-family:Inter,"PingFang SC","Microsoft YaHei",Arial,sans-serif;
}
button,input,select,textarea{font:inherit}
button{color:inherit}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}

.login-screen{
  position:fixed;
  inset:0;
  z-index:200;
  display:grid;
  place-items:center;
  padding:24px;
  background:linear-gradient(145deg,#eef7f4,#f8faf9 58%,#f2f1ea);
}
.login-screen.hidden{opacity:0;visibility:hidden;pointer-events:none;transition:.25s}
.login-card{
  width:min(430px,100%);
  padding:34px;
  border:1px solid var(--line);
  border-radius:8px;
  background:rgba(255,255,255,.92);
  box-shadow:var(--shadow);
}
.brand-mark{
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  border-radius:8px;
  background:linear-gradient(135deg,var(--teal),var(--gold));
  color:#fff;
  font-weight:900;
}
.eyebrow{
  margin:0 0 8px;
  color:var(--teal);
  font-size:11px;
  font-weight:800;
  letter-spacing:0;
  text-transform:uppercase;
}
.login-card .eyebrow{margin-top:20px}
.login-card h1{
  margin:0;
  font-size:30px;
  line-height:1.2;
}
.login-copy{
  margin:12px 0 22px;
  color:var(--muted);
  line-height:1.7;
}
.login-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-bottom:16px;
}
.login-tabs button,
.segmented button,
.file-filter button{
  height:38px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--paper-soft);
  cursor:pointer;
  color:var(--muted);
}
.login-tabs button.active,
.segmented button.active,
.file-filter button.active{
  color:#fff;
  border-color:var(--teal);
  background:var(--teal);
}
.login-pane{display:none}
.login-pane.active{display:grid;gap:12px}
label span,.field-line span{
  display:block;
  margin-bottom:7px;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}
input,select,textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  color:var(--ink);
  outline:none;
}
input,select{height:42px;padding:0 12px}
textarea{min-height:96px;padding:12px;resize:vertical;line-height:1.65}
input:focus,select:focus,textarea:focus{
  border-color:rgba(31,143,135,.55);
  box-shadow:0 0 0 3px rgba(31,143,135,.10);
}
.primary-action,
.secondary-action,
.goal-form button,
.inline-form button,
.quick-note-form button,
.note-form button,
.link-form button,
.weather-form button,
.focus-actions button,
.capsule-panel button,
.upload-picker,
.panel-title button{
  height:42px;
  border:0;
  border-radius:8px;
  background:var(--teal);
  color:#fff;
  cursor:pointer;
  font-weight:800;
}
.primary-action:disabled,
.inline-form button:disabled,
.upload-submit:disabled{opacity:.48;cursor:not-allowed}
.secondary-action{
  padding:0 14px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--teal-dark);
}
.login-message{
  min-height:20px;
  margin-top:16px;
  color:var(--muted);
  font-size:13px;
}
.login-message.ok{color:var(--green)}
.login-message.error{color:var(--red)}

.app-shell{min-height:100vh}
.portal-gate{
  position:fixed;
  inset:0;
  z-index:85;
  display:grid;
  place-items:center;
  align-content:center;
  gap:16px;
  overflow:hidden;
  color:#f2fbf6;
  background:
    radial-gradient(circle at 50% 42%,rgba(43,144,148,.28),transparent 28%),
    radial-gradient(circle at 52% 50%,rgba(10,18,34,.08),rgba(4,25,42,.70) 50%,rgba(2,16,27,.95) 100%),
    linear-gradient(145deg,#05315a,#063b41 46%,#061b2b);
  transition:opacity .45s ease,visibility .45s ease,transform .45s ease;
}
.portal-gate::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 24% 20%,rgba(86,190,142,.18),transparent 22%),
    radial-gradient(circle at 76% 78%,rgba(154,203,114,.14),transparent 24%);
  pointer-events:none;
}
.orbit-field{
  position:absolute;
  inset:50%;
  z-index:4;
  width:min(760px,92vw);
  height:min(680px,86vh);
  transform:translate(-50%,-50%);
  pointer-events:none;
}
.orbit-field::before{
  content:"";
  position:absolute;
  inset:112px 92px;
  border:1px solid rgba(229,255,224,.18);
  border-radius:50%;
  box-shadow:0 0 70px rgba(82,190,146,.08);
}
.space-entry{
  --entry-w:176px;
  --entry-h:78px;
  --accent:#b9ef7e;
  --glow:rgba(128,224,142,.28);
  position:absolute;
  left:50%;
  top:50%;
  width:var(--entry-w);
  min-height:var(--entry-h);
  display:grid;
  align-content:center;
  gap:5px;
  padding:15px 18px;
  border:1px solid rgba(232,255,228,.28);
  border-radius:8px;
  background:
    linear-gradient(135deg,rgba(255,255,255,.18),rgba(255,255,255,.07)),
    linear-gradient(135deg,rgba(11,54,66,.92),rgba(12,83,74,.84));
  color:#f8fff5;
  box-shadow:0 18px 44px rgba(0,0,0,.24), inset 0 0 0 1px rgba(255,255,255,.12);
  backdrop-filter:blur(12px);
  appearance:none;
  font:inherit;
  text-decoration:none;
  text-align:left;
  transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y))) rotate(var(--tilt));
  transform-origin:center;
  animation:spaceDrift var(--speed,8s) ease-in-out infinite;
  cursor:pointer;
  pointer-events:auto;
  transition:transform .24s ease,box-shadow .24s ease,filter .24s ease,border-color .24s ease,background .24s ease;
}
.space-entry::before{
  content:"";
  position:absolute;
  left:0;
  top:14px;
  bottom:14px;
  width:4px;
  border-radius:0 6px 6px 0;
  background:var(--accent);
  box-shadow:0 0 24px var(--glow);
}
.space-entry::after{
  content:"";
  position:absolute;
  right:15px;
  top:15px;
  width:9px;
  height:9px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 22px var(--glow);
}
.space-entry span,
.space-entry small{
  position:relative;
  z-index:1;
  display:block;
}
.space-entry span{
  font-size:18px;
  font-weight:900;
  line-height:1.05;
  letter-spacing:0;
}
.space-entry small{
  color:rgba(242,255,238,.70);
  font-size:11px;
  font-weight:800;
  letter-spacing:0;
  text-transform:uppercase;
}
.space-entry:hover,
.space-entry:focus-visible,
.space-entry.loading{
  border-color:rgba(242,255,230,.58);
  filter:brightness(1.08);
  box-shadow:0 24px 60px rgba(0,0,0,.32),0 0 38px var(--glow),inset 0 0 0 1px rgba(255,255,255,.22);
  transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y) - 9px)) rotate(var(--tilt)) scale(1.04);
  outline:0;
}
.space-entry.loading{pointer-events:none}
.space-entry.loading small{color:#fff}
.space-entry.loading::after{animation:entryPulse .8s ease-in-out infinite}
.entry-notes{--x:0px;--y:-270px;--tilt:0deg;--speed:7.8s;--accent:#d8f27a;--glow:rgba(216,242,122,.30)}
.entry-gallery{--x:-304px;--y:-42px;--tilt:-5deg;--speed:8.6s;--accent:#76d8ff;--glow:rgba(118,216,255,.30)}
.entry-sports{--x:304px;--y:-42px;--tilt:5deg;--speed:8.2s;--accent:#9ee37d;--glow:rgba(158,227,125,.30)}
.portal-avatar-button{
  position:relative;
  z-index:5;
  width:min(320px,62vw);
  aspect-ratio:1;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  cursor:pointer;
  transition:transform .28s ease,filter .28s ease;
}
.portal-avatar-button:hover{transform:translateY(-4px) scale(1.02);filter:brightness(1.04)}
.portal-avatar-button:focus-visible{
  outline:3px solid rgba(201,226,124,.88);
  outline-offset:8px;
}
.portal-ring{
  position:absolute;
  inset:0;
  display:block;
  padding:10px;
  border-radius:50%;
  background:
    conic-gradient(from 20deg,#d9f394,#49b782,#e9fff7,#3e92a3,#d9f394);
  box-shadow:0 28px 90px rgba(0,0,0,.42),0 0 0 14px rgba(255,255,255,.06),0 0 90px rgba(84,190,146,.24);
}
.portal-ring::after{
  content:"";
  position:absolute;
  inset:-20px;
  border-radius:50%;
  border:1px solid rgba(230,255,228,.18);
}
.portal-ring img{
  width:100%;
  height:100%;
  border-radius:50%;
  object-fit:cover;
  object-position:50% 34%;
  border:5px solid rgba(5,22,35,.88);
  background:#082638;
}
.portal-gate h1{
  position:relative;
  z-index:2;
  margin:12px 0 0;
  font-size:clamp(32px,6vw,54px);
  line-height:1;
  letter-spacing:0;
  text-indent:0;
}
.portal-gate p{
  position:relative;
  z-index:2;
  margin:0;
  color:rgba(237,252,241,.74);
  font-size:14px;
  letter-spacing:0;
}
body.portal-closed:not(.auth-locked){overflow:hidden}
body.portal-closed .sidebar,
body.portal-closed .page{
  visibility:hidden;
  opacity:0;
  pointer-events:none;
}
body.portal-open .portal-gate{
  visibility:hidden;
  opacity:0;
  transform:scale(1.02);
  pointer-events:none;
}
body.portal-open .sidebar,
body.portal-open .page{
  visibility:visible;
  opacity:1;
  pointer-events:auto;
  transition:opacity .35s ease;
}
@keyframes spaceDrift{
  0%,100%{margin-top:0}
  50%{margin-top:-12px}
}
@keyframes entryPulse{
  0%,100%{transform:scale(1);opacity:1}
  50%{transform:scale(1.55);opacity:.45}
}
.sidebar{
  position:fixed;
  left:0;
  top:0;
  bottom:0;
  z-index:90;
  width:var(--sidebar);
  display:flex;
  flex-direction:column;
  border-right:1px solid rgba(255,255,255,.12);
  background:#163036;
  color:#eaf4f1;
}
.side-brand{
  height:88px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 18px;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.side-brand img{
  width:46px;
  height:46px;
  border-radius:8px;
  background:#fff;
}
.side-brand strong,
.side-brand small{display:block}
.side-brand strong{font-size:18px}
.side-brand small{margin-top:4px;color:#a9c1bd;font-size:12px}
.side-nav{
  display:grid;
  gap:6px;
  padding:16px 12px;
  overflow:auto;
}
.side-nav a{
  height:42px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 12px;
  border:1px solid transparent;
  border-radius:8px;
  color:#b7cbc7;
  font-size:14px;
}
.side-nav a i{
  width:24px;
  color:#73918c;
  font-style:normal;
  font-size:11px;
  font-weight:900;
}
.side-nav a:hover,
.side-nav a.active{
  color:#fff;
  border-color:rgba(255,255,255,.10);
  background:rgba(255,255,255,.08);
}
.side-footer{
  margin-top:auto;
  padding:14px 12px 16px;
  border-top:1px solid rgba(255,255,255,.10);
}
.sync-state{
  min-height:34px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 10px;
  border-radius:8px;
  background:rgba(255,255,255,.07);
  color:#b9cbc8;
  font-size:12px;
}
.sync-state i{
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--gold);
}
.sync-state.synced i{background:#55d49c}
.sync-state.saving i{background:#8fd8ff}
.sync-state.error i{background:#ff7780}
.side-footer button{
  width:100%;
  height:38px;
  margin-top:10px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:8px;
  background:transparent;
  color:#d6e5e2;
  cursor:pointer;
}

.page{
  min-height:100vh;
  margin-left:var(--sidebar);
}
.topbar{
  position:sticky;
  top:0;
  z-index:70;
  height:76px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:0 28px;
  border-bottom:1px solid rgba(32,50,56,.10);
  background:rgba(248,251,250,.86);
  backdrop-filter:blur(16px);
}
.menu-toggle{display:none}
.icon-button{
  width:38px;
  height:38px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  cursor:pointer;
  font-size:20px;
}
.top-title strong{display:block;font-size:16px}
.top-title span{display:block;margin-top:4px;color:var(--muted);font-size:12px}
.top-actions{
  display:flex;
  align-items:center;
  gap:10px;
}
.weather-chip,
.role-chip{
  min-height:42px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
}
.weather-chip{cursor:pointer}
.weather-chip b{color:var(--teal)}
.role-chip{
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:1px;
  min-width:96px;
}
.role-chip span{font-weight:800}
.role-chip small{color:var(--muted);font-size:10px}
.clock{text-align:right}
.clock strong{display:block;font-size:18px}
.clock small{display:block;margin-top:3px;color:var(--muted);font-size:11px}

main{padding:28px}
.workspace{
  scroll-margin-top:96px;
  margin-bottom:34px;
}
.section-header{
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:flex-end;
  margin-bottom:18px;
}
.section-header h1,
.section-header h2{
  margin:0;
  font-size:32px;
  line-height:1.2;
}
.section-header p:last-child{
  max-width:450px;
  margin:0;
  color:var(--muted);
  line-height:1.7;
}
.overview-grid{
  display:grid;
  grid-template-columns:1.25fr .95fr 1fr;
  gap:14px;
}
.tool-grid{
  display:grid;
  grid-template-columns:1.2fr .86fr .9fr;
  gap:14px;
  margin-top:14px;
}
.plan-grid,
.file-grid,
.profile-grid{
  display:grid;
  grid-template-columns:1.15fr 1fr 1fr;
  gap:14px;
}
.profile-grid{grid-template-columns:1fr 1fr}
.panel{
  min-width:0;
  padding:20px;
  border:1px solid var(--line);
  border-radius:8px;
  background:rgba(255,255,255,.92);
  box-shadow:var(--shadow);
}
.panel-title{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
}
.panel-title span{
  grid-column:1;
  display:block;
  color:var(--teal);
  font-size:10px;
  font-weight:900;
  letter-spacing:0;
}
.panel-title h2{
  grid-column:1;
  margin:4px 0 0;
  font-size:20px;
}
.panel-title small,
.panel-title a{
  grid-column:2;
  grid-row:1 / 3;
  align-self:center;
  color:var(--muted);
  font-size:12px;
}
.panel-title a{font-weight:800}
.panel-title button{
  grid-column:2;
  grid-row:1 / 3;
  align-self:center;
  width:auto;
  height:34px;
  padding:0 12px;
  background:#eef6f3;
  color:var(--teal-dark);
}
.brief-head{
  display:flex;
  align-items:center;
  gap:14px;
}
.brief-head img{
  width:64px;
  height:64px;
  border-radius:8px;
  background:#eef6f3;
}
.brief-head span{
  display:block;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}
.brief-head strong{
  display:block;
  margin-top:5px;
  font-size:22px;
  line-height:1.35;
}
.goal-form{
  display:grid;
  grid-template-columns:1fr 82px;
  gap:8px;
  margin-top:18px;
}
.goal-form button,
.quick-note-form button,
.link-form button,
.weather-form button{height:42px}
.quote{
  margin:18px 0 12px;
  color:var(--muted);
  line-height:1.8;
}
.stat-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.stat-item{
  min-height:82px;
  padding:14px;
  border:1px solid #e8eeee;
  border-radius:8px;
  background:var(--paper-soft);
}
.stat-item span{
  display:block;
  color:var(--muted);
  font-size:12px;
}
.stat-item strong{
  display:block;
  margin-top:12px;
  font-size:18px;
}
.quick-note-form{display:grid;gap:10px}
.quick-note-form div{
  display:grid;
  grid-template-columns:120px 1fr;
  gap:8px;
}
.inline-form,
.note-form,
.link-form,
.weather-form{
  display:grid;
  gap:8px;
}
.inline-form{
  grid-template-columns:1fr 42px;
}
.note-form{
  grid-template-columns:1fr 120px 92px;
  margin-bottom:12px;
}
.link-form{
  grid-template-columns:.75fr 1fr 78px;
  margin-bottom:12px;
}
.progress-track{
  height:7px;
  overflow:hidden;
  border-radius:8px;
  background:#edf3f1;
}
.progress-track i{
  display:block;
  width:0;
  height:100%;
  background:linear-gradient(90deg,var(--teal),var(--gold));
  transition:width .25s;
}
.item-list,
.link-list,
.server-file-list{
  display:grid;
  gap:8px;
  margin-top:14px;
}
.empty-state{
  padding:16px;
  border:1px dashed #d5e0dd;
  border-radius:8px;
  color:var(--muted);
  background:#fbfcfb;
  text-align:center;
}
.task-item,
.link-item,
.server-file,
.note-card{
  border:1px solid #e5ece9;
  border-radius:8px;
  background:#fff;
}
.task-item{
  min-height:48px;
  display:grid;
  grid-template-columns:34px 1fr auto;
  align-items:center;
  gap:8px;
  padding:8px;
}
.task-item.done .task-text{
  color:var(--faint);
  text-decoration:line-through;
}
.check-button,
.mini-icon{
  width:30px;
  height:30px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  cursor:pointer;
}
.check-button.done{
  border-color:var(--teal);
  background:var(--teal);
  color:#fff;
}
.row-actions{
  display:flex;
  gap:6px;
}
.focus-time{
  display:grid;
  place-items:center;
  height:118px;
  border:1px solid #e7eeeb;
  border-radius:8px;
  background:#f8fbfa;
  color:var(--teal-dark);
  font-size:46px;
  font-weight:900;
}
.segmented{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin-top:12px;
}
.focus-actions{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:8px;
  margin-top:10px;
}
.focus-actions button:nth-child(2),
.focus-actions button:nth-child(3){
  border:1px solid var(--line);
  background:#fff;
  color:var(--teal-dark);
}
.focus-meta{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:12px;
}
.focus-meta span{
  padding:12px;
  border-radius:8px;
  background:#f5f8f7;
  color:var(--muted);
  font-size:12px;
}
.focus-meta b{
  display:block;
  margin-top:4px;
  color:var(--ink);
  font-size:16px;
}
.mood-current{
  min-height:78px;
  padding:16px;
  border:1px solid #e7eeeb;
  border-radius:8px;
  background:#f8fbfa;
}
.mood-current strong{
  display:block;
  font-size:24px;
}
.mood-current span{
  display:block;
  margin-top:7px;
  color:var(--muted);
}
.mood-options{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:12px;
}
.mood-options button{
  height:42px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  cursor:pointer;
}
.mood-options button.active{
  border-color:var(--teal);
  background:#eef7f4;
  color:var(--teal-dark);
  font-weight:800;
}
.habit-grid{
  display:grid;
  grid-template-columns:92px repeat(7,1fr);
  gap:6px;
}
.habit-grid div,
.habit-grid button{
  min-height:34px;
  border:1px solid #e4ebe8;
  border-radius:8px;
  background:#fff;
}
.habit-grid div{
  display:grid;
  place-items:center;
  color:var(--muted);
  font-size:12px;
}
.habit-grid .habit-name{
  justify-content:start;
  padding-left:10px;
  color:var(--ink);
  font-weight:700;
}
.habit-grid button{
  cursor:pointer;
}
.habit-grid button.done{
  border-color:var(--teal);
  background:linear-gradient(135deg,var(--teal),#5ab89f);
}
.capsule-panel form{display:grid;gap:10px}
.capsule-panel button{height:42px}
.capsule-latest{
  margin-top:14px;
  padding:14px;
  border:1px solid #e6eeeb;
  border-radius:8px;
  background:#fbfcfb;
  color:var(--muted);
  line-height:1.7;
}
.link-item{
  min-height:50px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:center;
  padding:10px 12px;
}
.link-item a strong,
.link-item a small{
  display:block;
}
.link-item a small{
  margin-top:3px;
  color:var(--muted);
  word-break:break-all;
}
.notes-toolbar{
  display:grid;
  grid-template-columns:1fr 140px;
  gap:10px;
  margin-bottom:14px;
}
.notes-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.note-card{
  min-height:150px;
  display:flex;
  flex-direction:column;
  padding:14px;
}
.note-card header{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.note-card .tag{
  display:inline-flex;
  align-items:center;
  height:24px;
  padding:0 8px;
  border-radius:8px;
  background:#eef7f4;
  color:var(--teal-dark);
  font-size:12px;
  font-weight:800;
}
.note-card p{
  margin:0;
  flex:1;
  line-height:1.75;
  white-space:pre-wrap;
  word-break:break-word;
}
.note-card footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:14px;
  color:var(--muted);
  font-size:12px;
}
.note-card.pinned{
  border-color:rgba(185,135,40,.35);
  background:#fffdf6;
}
.file-grid{
  grid-template-columns:1.25fr .9fr 1.15fr;
  align-items:start;
}
.gallery-strip{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
}
.gallery-card{
  min-height:142px;
  overflow:hidden;
  border:1px solid #e5ece9;
  border-radius:8px;
  background:#f7faf9;
}
.gallery-card img{
  width:100%;
  height:112px;
  object-fit:cover;
}
.gallery-card span{
  display:block;
  padding:8px;
  overflow:hidden;
  color:var(--muted);
  font-size:12px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.field-line{display:block;margin-bottom:12px}
.upload-picker{
  width:100%;
  height:86px;
  display:grid;
  place-items:center;
  border:1px dashed rgba(31,143,135,.45);
  background:#f5fbf9;
  color:var(--teal-dark);
}
.upload-picker small{
  color:var(--muted);
  font-weight:600;
}
.selected-files{
  margin:12px 0;
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
}
.file-filter{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}
.server-file{
  display:grid;
  grid-template-columns:48px 1fr auto;
  gap:10px;
  align-items:center;
  padding:10px;
}
.file-type{
  width:40px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:8px;
  background:#eef6f3;
  color:var(--teal-dark);
  font-size:11px;
  font-weight:900;
}
.server-file strong,
.server-file small{display:block}
.server-file small{
  margin-top:3px;
  color:var(--muted);
  font-size:12px;
}
.file-actions{
  display:flex;
  gap:6px;
}
.file-actions a,
.file-actions button{
  height:30px;
  padding:0 10px;
  display:inline-flex;
  align-items:center;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  cursor:pointer;
  color:var(--teal-dark);
  font-weight:800;
}
.about-panel p{
  margin:0;
  color:var(--muted);
  line-height:1.9;
}
.tag-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:16px;
}
.tag-list span{
  padding:7px 10px;
  border-radius:8px;
  background:#eef6f3;
  color:var(--teal-dark);
  font-size:13px;
  font-weight:800;
}
.entry-list{
  display:grid;
  gap:10px;
}
.entry-list a{
  min-height:66px;
  display:grid;
  align-content:center;
  padding:12px;
  border:1px solid #e5ece9;
  border-radius:8px;
  background:#fff;
}
.entry-list strong,
.entry-list span{display:block}
.entry-list span{
  margin-top:5px;
  color:var(--muted);
  font-size:13px;
}
.muted-text{
  margin:0;
  color:var(--muted);
  line-height:1.8;
}
footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:62px;
  margin:0 28px;
  border-top:1px solid rgba(32,50,56,.10);
  color:var(--muted);
  font-size:13px;
}
footer b{font-size:11px}

.modal{
  position:fixed;
  inset:0;
  z-index:180;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(18,31,36,.40);
  opacity:0;
  visibility:hidden;
  transition:.2s;
}
.modal.open{opacity:1;visibility:visible}
.modal-card{
  width:min(520px,100%);
  position:relative;
  padding:24px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  box-shadow:var(--shadow);
}
.modal-card h2{margin:0 0 16px}
.modal-close{
  position:absolute;
  right:14px;
  top:14px;
}
.weather-detail{
  display:grid;
  gap:10px;
  margin-top:16px;
  padding:16px;
  border:1px solid #e7eeeb;
  border-radius:8px;
  background:#f8fbfa;
}
.weather-detail strong{font-size:44px}
.weather-detail span{color:var(--muted)}
.weather-detail ul{
  display:grid;
  gap:8px;
  padding:0;
  margin:6px 0 0;
  list-style:none;
}
.weather-detail li{
  display:flex;
  justify-content:space-between;
  color:var(--muted);
}
.weather-detail b{color:var(--ink)}

.toast{
  position:fixed;
  left:50%;
  bottom:24px;
  z-index:240;
  max-width:min(420px,calc(100% - 32px));
  transform:translate(-50%,16px);
  padding:12px 16px;
  border-radius:8px;
  background:#163036;
  color:#fff;
  opacity:0;
  pointer-events:none;
  transition:.22s;
  box-shadow:var(--shadow);
}
.toast.show{
  opacity:1;
  transform:translate(-50%,0);
}

.admin-only{display:none!important}
body[data-role="admin"] .admin-only{display:block!important}
body[data-role="admin"] .file-manager.admin-only{display:block!important}
body[data-role="admin"] .upload-panel.admin-only{display:block!important}
body.auth-locked .app-shell{filter:blur(2px)}

@media(max-width:1180px){
  .overview-grid,
  .tool-grid,
  .plan-grid,
  .file-grid{grid-template-columns:1fr 1fr}
  .quick-note-panel,
  .task-panel,
  .gallery-panel{grid-column:span 2}
  .notes-grid{grid-template-columns:1fr 1fr}
}

@media(max-width:860px){
  :root{--sidebar:0px}
  .sidebar{
    width:248px;
    transform:translateX(-100%);
    transition:.22s;
  }
  .sidebar.open{transform:none}
  .page{margin-left:0}
  .menu-toggle{display:inline-grid;place-items:center}
  .topbar{padding:0 16px}
  .top-title strong{display:none}
  .top-actions{gap:8px}
  .role-chip{display:none}
  main{padding:18px 14px}
  footer{margin:0 14px}
}

@media(max-width:640px){
  .login-card{padding:24px}
  .orbit-field{
    width:100vw;
    height:100vh;
  }
  .orbit-field::before{inset:145px 28px}
  .space-entry{
    --entry-w:116px;
    --entry-h:58px;
    gap:3px;
    padding:10px 12px 10px 14px;
    transform:translate(calc(-50% + var(--mx,var(--x))),calc(-50% + var(--my,var(--y)))) rotate(var(--tilt));
  }
  .space-entry:hover,
  .space-entry:focus-visible{
    transform:translate(calc(-50% + var(--mx,var(--x))),calc(-50% + var(--my,var(--y)) - 7px)) rotate(var(--tilt)) scale(1.05);
  }
  .space-entry span{font-size:14px}
  .space-entry small{font-size:8px}
  .space-entry::before{
    top:10px;
    bottom:10px;
  }
  .space-entry::after{
    right:10px;
    top:10px;
    width:7px;
    height:7px;
  }
  .entry-notes{--mx:0px;--my:-220px}
  .entry-gallery{--mx:-136px;--my:-62px}
  .entry-sports{--mx:136px;--my:-62px}
  .portal-avatar-button{width:min(220px,58vw)}
  .portal-gate h1{font-size:34px}
  .topbar{height:68px}
  .weather-chip{display:none}
  .clock strong{font-size:16px}
  .section-header{
    display:grid;
    gap:8px;
    align-items:start;
  }
  .section-header h1,
  .section-header h2{font-size:26px}
  .overview-grid,
  .tool-grid,
  .plan-grid,
  .file-grid,
  .profile-grid,
  .notes-grid{grid-template-columns:1fr}
  .quick-note-panel,
  .task-panel,
  .gallery-panel{grid-column:auto}
  .goal-form,
  .note-form,
  .link-form,
  .notes-toolbar,
  .quick-note-form div{grid-template-columns:1fr}
  .focus-actions,
  .focus-meta,
  .mood-options{grid-template-columns:1fr}
  .habit-grid{grid-template-columns:72px repeat(7,1fr);gap:4px}
  .habit-grid div,
  .habit-grid button{min-height:30px;font-size:11px}
  .gallery-strip{grid-template-columns:1fr}
  .server-file{grid-template-columns:42px 1fr}
  .file-actions{grid-column:1 / -1}
}

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

/* V11 private workspace */
:root{
  --bg:#f2f5f1;
  --paper:#fff;
  --paper-soft:#f7f9f6;
  --ink:#1b251f;
  --muted:#6d786f;
  --faint:#919b94;
  --line:#dce3dd;
  --teal:#18794e;
  --teal-dark:#173a2b;
  --coral:#d9653b;
  --gold:#aa7a20;
  --green:#23865c;
  --shadow:0 8px 24px rgba(27,51,38,.07);
  --sidebar:224px;
}
body{background:var(--bg)}
.login-screen{background:#eef3ef}
.login-card{background:#fff;box-shadow:0 18px 50px rgba(24,58,42,.12)}
.brand-mark{background:var(--teal-dark)}
.portal-gate{
  gap:13px;
  color:#f5faf6;
  background:#173a2b;
  transition:opacity .28s ease,visibility .28s ease;
}
.portal-gate::before{display:none}
.orbit-field::before{border-color:rgba(220,236,225,.24);box-shadow:none}
.space-entry{
  --accent:#a8d4b4;
  --glow:transparent;
  border-color:rgba(235,245,238,.28);
  background:rgba(255,255,255,.08);
  box-shadow:0 12px 30px rgba(3,23,14,.18);
  backdrop-filter:none;
  animation:none;
  transition:transform .18s ease,border-color .18s ease,background .18s ease;
}
.space-entry::before,
.space-entry::after{box-shadow:none}
.space-entry small{color:rgba(241,248,243,.65)}
.space-entry:hover,
.space-entry:focus-visible,
.space-entry.loading{
  border-color:rgba(244,250,246,.68);
  background:rgba(255,255,255,.14);
  filter:none;
  box-shadow:0 18px 36px rgba(3,23,14,.24);
}
.entry-notes{--accent:#f0c66e;--glow:transparent}
.entry-gallery{--accent:#9eced3;--glow:transparent}
.entry-sports{--accent:#a8d4b4;--glow:transparent}
.portal-avatar-button{transition:transform .2s ease}
.portal-avatar-button:hover{filter:none}
.portal-ring{
  padding:8px;
  background:#dce9df;
  box-shadow:0 24px 64px rgba(3,23,14,.28),0 0 0 12px rgba(255,255,255,.06);
}
.portal-ring::after{border-color:rgba(230,242,233,.22)}
.portal-ring img{border:5px solid #102a20;background:#102a20}
.portal-gate h1{font-size:clamp(34px,5vw,48px)}
.portal-gate p{color:rgba(237,247,240,.68)}
.sidebar{background:var(--teal-dark)}
.side-nav a{color:#b8cbbf}
.side-nav a i{color:#83a290}
.side-nav a:hover,
.side-nav a.active{background:rgba(255,255,255,.1)}
.topbar{
  height:72px;
  padding:0 24px;
  background:rgba(248,250,247,.94);
  backdrop-filter:blur(10px);
}
main{width:min(1480px,100%);margin:0 auto;padding:24px}
.workspace{margin-bottom:30px}
.workspace:not(.today-section){
  content-visibility:auto;
  contain-intrinsic-size:900px;
}
.section-header{margin-bottom:16px}
.section-header h1,
.section-header h2{font-size:29px}
.panel{background:#fff;box-shadow:var(--shadow)}
.stat-item{background:#f7f9f6}
.weather-chip,
.role-chip{background:#fff}
footer{width:min(1428px,calc(100% - 48px));margin:0 auto}
@media(max-width:860px){
  body.portal-open{padding-bottom:72px}
  .sidebar,
  .sidebar.open{
    inset:auto 0 0;
    width:100%;
    height:72px;
    display:block;
    transform:none;
    border:0;
    border-top:1px solid rgba(255,255,255,.12);
  }
  .side-brand,
  .side-footer{display:none}
  .side-nav{
    height:100%;
    grid-template-columns:repeat(5,1fr);
    gap:2px;
    padding:6px 8px;
    overflow:visible;
  }
  .side-nav a{
    height:58px;
    min-width:0;
    flex-direction:column;
    justify-content:center;
    gap:2px;
    padding:4px;
    text-align:center;
    font-size:10px;
  }
  .side-nav a i{width:auto;font-size:10px}
  .side-nav a[href="sports.html"],
  .side-nav a[href="gallery.html"]{display:none}
  .menu-toggle{display:none}
  .page{margin-left:0}
  .topbar{padding:0 16px}
  main{padding:18px 14px 28px}
  footer{width:calc(100% - 28px);margin:0 14px}
  .toast{bottom:86px}
}
@media(max-width:640px){
  .portal-gate{gap:11px}
  .portal-avatar-button{width:min(210px,57vw)}
  .portal-gate h1{font-size:32px}
  .space-entry{
    --entry-w:132px;
    box-shadow:0 10px 24px rgba(3,23,14,.2);
  }
  .entry-notes{--mx:0px;--my:-220px}
  .entry-gallery{--mx:-104px;--my:210px;--tilt:-2deg}
  .entry-sports{--mx:104px;--my:210px;--tilt:2deg}
  .section-header h1,
  .section-header h2{font-size:25px}
}
