/* Duty On 官网与云空间。
   视觉沿用桌宠本体：黑色舞台、身后一束主题色的光、一排"值班牌"。
   颜色只有三类——纸白系文字、主题色（--ink，可切换）、状态色；珊瑚红只留给
   "需要你"（确认、删除、出错）。 */

:root {
  color-scheme: dark;
  --stage: #0b0b0d;
  --tile-top: #24242a;
  --tile-bot: #17171b;
  --hair: rgba(255, 255, 255, .09);
  --paper: #f3efe7;
  --dim: #a29d93;
  --faint: #6f6b63;
  --coral: #ff5f52;
  --coral-deep: #f2463b;
  --coral-ink: #2a0906;
  --idle: #7d8797;
  --thinking: #ae9fff;
  --tool: #ff9f45;
  --working: #ffc94d;
  --ink: #e0a653;
  --ink-rgb: 224, 166, 83;
  --ink-dark: #15120c;
  --radius: 16px;
  --sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --round: "Arial Rounded MT Bold", "SF Pro Rounded", ui-rounded, "Nunito", var(--sans);
}
:root[data-ink="ice"] { --ink: #8ac2e6; --ink-rgb: 138, 194, 230; }
:root[data-ink="white"] { --ink: #e2dccb; --ink-rgb: 226, 220, 203; }
:root[data-ink="green"] { --ink: #7ecf86; --ink-rgb: 126, 207, 134; }
:root[data-ink="pink"] { --ink: #e897c6; --ink-rgb: 232, 151, 198; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--stage);
  color: var(--paper);
  font: 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.muted { color: var(--dim); }
.fine { color: var(--faint); font-size: 13.5px; line-height: 1.6; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--ink-dark); padding: 6px 12px; border-radius: 8px; }
.skip:focus { left: 8px; z-index: 10; }

/* ---- 顶栏 ---- */
.top {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; }
.brand-name { font: 700 20px/1 var(--round); letter-spacing: .2px; }
.brand-cn { color: var(--dim); font-size: 14px; padding-left: 10px; border-left: 1px solid var(--hair); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--dim); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--paper); }
.inks { display: flex; gap: 8px; }
.ink {
  width: 18px; height: 18px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--stage); background: var(--swatch);
  box-shadow: 0 0 0 1px var(--hair);
}
.ink[data-ink="amber"] { --swatch: #e0a653; }
.ink[data-ink="ice"] { --swatch: #8ac2e6; }
.ink[data-ink="white"] { --swatch: #e2dccb; }
.ink[data-ink="green"] { --swatch: #7ecf86; }
.ink[data-ink="pink"] { --swatch: #e897c6; }
.ink[aria-checked="true"] { box-shadow: 0 0 0 2px var(--swatch); }

/* ---- 状态灯：每种状态一个动作，不看颜色也分得清 ---- */
.lamp { position: relative; display: inline-block; flex: none; width: 22px; height: 22px; }
.lamp::before, .lamp::after { content: ""; position: absolute; border-radius: 50%; }
.lamp-idle::before { inset: 5px; border: 2px solid var(--idle); }
.lamp-working::before { inset: 6px; background: var(--working); }
.lamp-working::after { inset: 6px; border: 1.5px solid var(--working); animation: ripple 1.6s ease-out infinite; }
.lamp-thinking::before {
  left: 2px; top: 9px; width: 4.5px; height: 4.5px; background: var(--thinking);
  box-shadow: 7px 0 0 var(--thinking), 14px 0 0 var(--thinking);
  animation: think 1.3s ease-in-out infinite;
}
.lamp-tool::before {
  inset: 3px; border: 2.5px dotted var(--tool);
  animation: spin 1.8s linear infinite;
}
.lamp-alert {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--coral-ink); color: var(--coral);
  font: 800 15px/24px var(--sans); text-align: center;
}
@keyframes ripple { from { transform: scale(1); opacity: .7; } to { transform: scale(2.3); opacity: 0; } }
@keyframes think { 0%, 100% { transform: translateY(1.5px); opacity: .55; } 50% { transform: translateY(-1.5px); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- 按钮 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 23px; cursor: pointer;
  border: 1px solid var(--hair); text-decoration: none;
  background: linear-gradient(var(--tile-top), var(--tile-bot));
  color: var(--paper); font-size: 15.5px; font-weight: 600; white-space: nowrap;
}
.btn:hover { border-color: rgba(255, 255, 255, .22); }
.btn:disabled { opacity: .5; cursor: progress; }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--ink-dark); }
.btn-ink:hover { border-color: var(--ink); filter: brightness(1.07); }
.btn-quiet { min-height: 38px; padding: 0 16px; font-size: 14px; font-weight: 500; color: var(--dim); background: none; }
.btn-danger { background: var(--coral); border-color: var(--coral); color: var(--coral-ink); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---- 首屏 ---- */
.hero {
  max-width: 1120px; margin: 0 auto; padding: 44px 28px 72px;
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 64px; align-items: center;
}
h1 { font-size: clamp(38px, 5.6vw, 64px); line-height: 1.16; font-weight: 800; letter-spacing: -.5px; }
.lede { margin-top: 24px; max-width: 34em; color: var(--dim); font-size: 17px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .fine { margin-top: 14px; }
.legend { margin-top: 44px; display: grid; gap: 12px; }
.legend li { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 15px; }
.legend b { color: var(--paper); font-weight: 600; min-width: 2.6em; }

/* 设备屏：480x800 竖屏按比例缩小 */
.device { justify-self: center; width: 340px; max-width: 100%; }
.device figcaption { margin-top: 14px; color: var(--faint); font-size: 13px; text-align: center; }
.screen {
  position: relative; overflow: hidden; aspect-ratio: 480 / 800;
  background: #000; border-radius: 22px; padding: 14px 12px 10px;
  border: 1px solid #2c2c33; box-shadow: 0 0 0 6px #141418, 0 30px 80px -30px rgba(var(--ink-rgb), .35);
  display: flex; flex-direction: column;
}
.screen::after {  /* 有任务等确认：四边泛珊瑚色光 */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 46px 6px rgba(255, 95, 82, .55); opacity: 0; transition: opacity .5s;
}
.screen[data-state="alert"]::after { opacity: 1; animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.scr-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 0 6px; }
.scr-time { font: 700 42px/1 var(--round); color: var(--ink); font-variant-numeric: tabular-nums; }
.scr-time small { font-size: 18px; opacity: .55; margin-left: 5px; }
.scr-date { text-align: right; display: grid; justify-items: end; gap: 2px; font-size: 16px; line-height: 1.2; }
.scr-date small { color: var(--dim); font-size: 13px; }
.scr-net { display: flex; gap: 8px; align-items: flex-end; height: 14px; margin-bottom: 4px; }
.scr-net .pc { width: 15px; height: 10px; border: 1.6px solid var(--ink); border-radius: 2.5px; position: relative; margin-bottom: 3px; }
.scr-net .pc::after { content: ""; position: absolute; left: 3px; right: 3px; bottom: -4.5px; height: 1.6px; background: var(--ink); }
.scr-net .wifi { display: flex; gap: 1.8px; align-items: flex-end; height: 13px; }
.scr-net .wifi b { width: 2.5px; border-radius: 2px; background: var(--ink); }
.scr-net .wifi b:nth-child(1) { height: 4px; } .scr-net .wifi b:nth-child(2) { height: 7px; }
.scr-net .wifi b:nth-child(3) { height: 10px; } .scr-net .wifi b:nth-child(4) { height: 13px; }
.scr-stage {
  position: relative; flex: 1; min-height: 0; display: grid; place-items: end center;
  background: none; border: 0; padding: 0; cursor: pointer; border-radius: 12px;
}
.scr-glow {  /* 舞台光：身后一团 + 脚下一摊，颜色跟整体状态走 */
  position: absolute; inset: 0; --glow: var(--ink-rgb); --level: .26;
  background:
    radial-gradient(46% 9% at 50% 94%, rgba(var(--glow), calc(var(--level) * 1.5)), transparent 100%),
    radial-gradient(62% 56% at 50% 52%, rgba(var(--glow), calc(var(--level) * .62)), transparent 100%);
  transition: opacity .6s; animation: glow 3.2s ease-in-out infinite;
}
.screen[data-state="sleeping"] .scr-glow { --level: .10; animation-duration: 6s; }
.screen[data-state="alert"] .scr-glow { --glow: 255, 95, 82; --level: .34; animation-duration: 1.4s; }
@keyframes glow { 0%, 100% { opacity: .78; } 50% { opacity: 1; } }
.scr-stage img { position: relative; max-width: 78%; max-height: 96%; width: auto; height: auto; transition: opacity .25s; }
.scr-stage img.swap { opacity: 0; }

/* ---- 值班牌 ---- */
.tiles { display: grid; gap: 5px; margin-top: 8px; }
.tile {
  display: flex; align-items: center; gap: 9px; height: 37px; padding: 0 12px 0 9px;
  border-radius: 11px; border: 1px solid var(--hair);
  background: linear-gradient(var(--tile-top), var(--tile-bot));
  font-size: 15px; min-width: 0;
}
.tile .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .tag {
  flex: none; width: 16px; height: 16px; border-radius: 4px; border: 1px solid currentColor;
  font: 600 10px/14px var(--sans); text-align: center; opacity: .75;
}
.tile .state { margin-left: auto; flex: none; font-size: 13px; }
.tile[data-status="idle"] { color: var(--dim); } .tile[data-status="idle"] .state { color: var(--faint); }
.tile[data-status="thinking"] .state { color: var(--thinking); }
.tile[data-status="tool"] .state { color: var(--tool); }
.tile[data-status="working"] .state { color: var(--working); }
.tile[data-status="alert"] {
  background: linear-gradient(var(--coral), var(--coral-deep)); border-color: var(--coral);
  color: var(--coral-ink); font-weight: 700;
  box-shadow: 0 0 14px 1px rgba(255, 95, 82, .5);
}
.tile .lamp { transform: scale(.82); }
.tag-A { color: #f09a7c; } .tag-T { color: #9db9ff; } .tag-C { color: #8fe8d8; }
.tag-Q { color: #cfaaff; } .tag-X { color: #ffc880; } .tag-O { color: #ff9fb5; }
.tile[data-status="alert"] .tag { color: inherit; }

/* ---- 分区 ---- */
.block { max-width: 1120px; margin: 0 auto; padding: 56px 28px; border-top: 1px solid var(--hair); }
.block-head { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: baseline; margin-bottom: 28px; }
h2 { font-size: 30px; line-height: 1.2; font-weight: 800; }
.block-head .muted { max-width: 40em; }
.block > .fine { margin-top: 18px; }

.tiles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.dl {
  display: grid; gap: 6px; padding: 20px 22px 18px; border-radius: var(--radius);
  border: 1px solid var(--hair); background: linear-gradient(var(--tile-top), var(--tile-bot));
  color: var(--paper); text-decoration: none;
}
.dl:hover { border-color: rgba(var(--ink-rgb), .6); }
.dl strong { font-size: 19px; }
.dl .what { color: var(--dim); font-size: 14.5px; min-height: 3.2em; }
.dl .meta { display: flex; justify-content: space-between; gap: 12px; color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }
.dl .get { margin-top: 8px; color: var(--ink); font-weight: 600; font-size: 15px; }
.dl.first { border-color: rgba(var(--ink-rgb), .55); box-shadow: 0 18px 50px -30px rgba(var(--ink-rgb), .6); }

/* ---- 云空间 ---- */
.auth { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 48px; align-items: start; }
.tile-form {
  display: grid; gap: 8px; padding: 26px; border-radius: var(--radius);
  border: 1px solid var(--hair); background: linear-gradient(var(--tile-top), var(--tile-bot));
}
.tile-form label { font-size: 14px; color: var(--dim); margin-top: 8px; }
.tile-form label:first-child { margin-top: 0; }
input[type="text"], input[type="password"], input[type="search"], input:not([type]) {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 11px;
  border: 1px solid var(--hair); background: #0f0f12; color: var(--paper);
}
input::placeholder { color: var(--faint); }
input:focus-visible { outline-offset: 0; border-color: var(--ink); }
.tile-form .row { margin-top: 16px; }
.tile-form .fine { margin-top: 8px; }
.points { display: grid; gap: 18px; padding-top: 8px; }
.points li { color: var(--dim); font-size: 15px; max-width: 30em; }
.points b { display: block; color: var(--paper); font-size: 16px; }

.space-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 18px; align-items: center; margin-bottom: 22px; }
.meter { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--tile-top); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--ink); transition: width .5s; }
.meter.full span { background: var(--coral); }

.drop {
  display: grid; gap: 10px; justify-items: start; padding: 24px 26px; border-radius: var(--radius);
  border: 1.5px dashed rgba(255, 255, 255, .16); margin-bottom: 30px;
}
.drop.over { border-color: var(--ink); background: rgba(var(--ink-rgb), .07); }
.drop-title { font-size: 18px; font-weight: 700; }
.drop .row { margin-top: 6px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.file-btn:focus-within { outline: 2px solid var(--ink); outline-offset: 3px; }
.progress { width: 100%; height: 4px; border-radius: 2px; background: var(--tile-top); overflow: hidden; margin-top: 8px; }
.progress span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }

.list-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 23px; border: 1px solid var(--hair); }
.tab { height: 36px; padding: 0 16px; border: 0; border-radius: 18px; background: none; color: var(--dim); cursor: pointer; font-size: 14.5px; }
.tab[aria-selected="true"] { background: var(--tile-top); color: var(--paper); }
.list-bar input[type="search"] { flex: 1; min-width: 180px; max-width: 320px; height: 44px; border-radius: 22px; margin-left: auto; }

.files { display: grid; gap: 8px; }
.file {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 9px 12px 9px 9px; border-radius: 14px; border: 1px solid var(--hair);
  background: linear-gradient(var(--tile-top), var(--tile-bot));
}
.thumb {
  width: 48px; height: 48px; border-radius: 10px; background: #0f0f12; overflow: hidden;
  display: grid; place-items: center; color: var(--faint); font: 700 11px/1 var(--sans); letter-spacing: .5px;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb.model { color: var(--ink); border: 1px solid rgba(var(--ink-rgb), .35); }
.file .name { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .sub { color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }
.file .acts { display: flex; gap: 6px; }
.file .acts .btn { min-height: 36px; padding: 0 14px; font-size: 14px; font-weight: 500; }
.file audio { display: none; }
.empty { padding: 34px 20px; text-align: center; color: var(--faint); border: 1px dashed var(--hair); border-radius: var(--radius); }
.files + .fine { margin-top: 18px; max-width: 46em; }

/* ---- 页脚与提示 ---- */
.foot { max-width: 1120px; margin: 0 auto; padding: 30px 28px 60px; border-top: 1px solid var(--hair); display: flex; flex-wrap: wrap; gap: 22px; font-size: 14px; color: var(--dim); }
.foot a { color: var(--dim); }
.foot .muted { margin-left: auto; color: var(--faint); }
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 5;
  max-width: min(560px, calc(100vw - 32px)); padding: 12px 20px; border-radius: 14px;
  background: var(--tile-top); border: 1px solid rgba(var(--ink-rgb), .5); color: var(--paper);
  font-size: 15px; box-shadow: 0 18px 50px -12px #000;
}
.toast.error { background: var(--coral); border-color: var(--coral); color: var(--coral-ink); font-weight: 600; }

@media (max-width: 860px) {
  .top { padding: 18px 20px; gap: 16px; flex-wrap: wrap; }
  .brand-cn { display: none; }
  .hero { grid-template-columns: 1fr; gap: 44px; padding: 24px 20px 56px; }
  .block { padding: 44px 20px; }
  .block-head { grid-template-columns: 1fr; gap: 8px; }
  .auth { grid-template-columns: 1fr; gap: 28px; }
  .file { grid-template-columns: 44px minmax(0, 1fr); }
  .file .acts { grid-column: 1 / -1; justify-content: flex-end; }
  .list-bar input[type="search"] { max-width: none; margin-left: 0; }
  .foot { padding: 26px 20px 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* 登录后标题是"某某 的云空间"，说明文字收起，标题占整行 */
.block-head:has(#space-sub[hidden]) { grid-template-columns: 1fr; }
