:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: rgba(13, 18, 26, 0.9);
  --panel-strong: rgba(17, 24, 35, 0.96);
  --line: rgba(151, 164, 181, 0.16);
  --line-strong: rgba(103, 232, 249, 0.34);
  --text: #eef4f8;
  --muted: #8a98aa;
  --faint: #5d6a7b;
  --green: #6ee7b7;
  --blue: #7cb7ff;
  --cyan: #67e8f9;
  --danger: #fb7185;
  --shadow: 0 18px 58px rgba(0, 0, 0, 0.32);
  --radius: 8px;
  --sans: "Inter", "HarmonyOS Sans SC", "MiSans", "PingFang SC",
    "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI",
    Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  letter-spacing: 0;
  background:
    linear-gradient(rgba(124, 183, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 183, 255, 0.028) 1px, transparent 1px),
    linear-gradient(180deg, #050608 0%, #08101a 48%, #07090d 100%);
  background-size: 36px 36px, 36px 36px, 100% 100%;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(112deg, transparent 0 57%, rgba(110, 231, 183, 0.055) 57% 57.1%, transparent 57.1%),
    linear-gradient(248deg, transparent 0 72%, rgba(124, 183, 255, 0.045) 72% 72.1%, transparent 72.1%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 0 42px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 236px;
  gap: 20px;
  align-items: start;
}

.terminal-mark,
.motto-line,
.command-label,
.card-heading span,
.date,
small,
.note-actions {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.terminal-mark {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0;
}

.brand-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.site-icon {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(151, 164, 181, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  object-fit: cover;
}

.terminal-mark span:first-child {
  display: inline-grid;
  min-width: 38px;
  min-height: 26px;
  place-items: center;
  border: 1px solid rgba(110, 231, 183, 0.28);
  border-radius: 7px;
  background: rgba(110, 231, 183, 0.07);
  color: var(--green);
  font-weight: 750;
}

.terminal-mark span:last-child {
  color: var(--muted);
}

.identity h1 {
  max-width: 760px;
  margin: 12px 0 12px;
  font-size: 40px;
  font-weight: 720;
  line-height: 1.16;
}

.motto-line {
  display: flex;
  min-height: 24px;
  gap: 10px;
  align-items: center;
  margin: 0;
}

.motto-line span:first-child {
  color: var(--blue);
}

.motto-line q {
  min-width: 0;
  color: #cdd8e5;
  quotes: none;
}

.typing-cursor {
  width: 2px;
  height: 17px;
  border-radius: 2px;
  background: var(--green);
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0.2;
  }
}

.time-card,
.card,
.search-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.time-card {
  display: grid;
  min-height: 108px;
  place-items: center;
  padding: 18px;
  text-align: center;
}

.clock {
  display: block;
  color: var(--green);
  font-size: 42px;
  font-weight: 760;
  line-height: 1;
}

.date {
  display: block;
  margin-top: 10px;
}

.command-center {
  width: min(860px, 100%);
  margin: 48px auto 26px;
}

.command-label {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 0 2px 10px;
}

.command-label span:first-child {
  color: var(--green);
  font-weight: 700;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 136px 92px;
  gap: 10px;
  align-items: center;
  padding: 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.search-panel:focus-within {
  border-color: var(--line-strong);
  background: var(--panel-strong);
  box-shadow: 0 20px 68px rgba(0, 0, 0, 0.42), 0 0 0 3px rgba(103, 232, 249, 0.055);
}

.search-panel input,
.search-panel select,
.search-panel button {
  width: 100%;
  height: 46px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: rgba(7, 9, 13, 0.58);
  color: var(--text);
  font-size: 16px;
}

.search-panel input {
  padding: 0 14px;
}

.search-panel select {
  padding: 0 10px;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.06);
}

.search-panel button {
  border-color: rgba(110, 231, 183, 0.42);
  background: rgba(110, 231, 183, 0.16);
  color: var(--green);
  font-weight: 750;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.search-panel button:hover {
  border-color: rgba(110, 231, 183, 0.62);
  background: rgba(110, 231, 183, 0.22);
}

.search-panel button:active {
  transform: translateY(1px);
}

.search-panel input::placeholder,
textarea::placeholder,
.task-form input::placeholder {
  color: var(--faint);
}

.task-form button,
.note-actions button {
  min-height: 38px;
  border: 1px solid rgba(110, 231, 183, 0.28);
  border-radius: 6px;
  background: rgba(110, 231, 183, 0.08);
  color: var(--green);
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.task-form button:hover,
.note-actions button:hover {
  border-color: rgba(110, 231, 183, 0.58);
  background: rgba(110, 231, 183, 0.13);
}

.task-form button:active,
.note-actions button:active {
  transform: translateY(1px);
}

.search-support {
  margin-top: 12px;
}

.search-support p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.card {
  min-width: 0;
  padding: 18px;
}

.site-section {
  margin-top: 16px;
}

.card-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.card-heading p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
}

.card-heading span {
  white-space: nowrap;
}

.link-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.link-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(151, 164, 181, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
}

.link-group[hidden] {
  display: none;
}

.section-header {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(151, 164, 181, 0.12);
  background: rgba(255, 255, 255, 0.018);
}

.section-header h2 {
  margin: 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 750;
}

.section-count {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.link-item {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(7, 9, 13, 0.36);
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.link-item[hidden] {
  display: none;
}

.link-item:hover {
  border-color: rgba(124, 183, 255, 0.4);
  background: rgba(124, 183, 255, 0.075);
  transform: translateY(-1px);
}

.link-mark {
  display: grid;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(110, 231, 183, 0.24);
  border-radius: 6px;
  color: var(--green);
  background: rgba(110, 231, 183, 0.06);
  font-size: 11px;
  font-weight: 780;
}

.link-text {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

small {
  display: block;
  overflow: hidden;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  display: none;
  padding: 22px 12px 6px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.work-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  margin-top: 16px;
}

.tasks-card,
.note-card {
  min-height: 350px;
}

.task-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 218px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 28px;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 8px 6px 8px 10px;
  border: 1px solid rgba(151, 164, 181, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.018);
}

.task-item input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--green);
}

.task-item span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.task-item.done span {
  color: var(--faint);
  text-decoration: line-through;
}

.remove-task {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--faint);
}

.remove-task:hover {
  color: var(--danger);
  background: rgba(251, 113, 133, 0.08);
}

.task-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  margin-top: 12px;
}

.task-form input {
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  padding: 0 11px;
  background: rgba(7, 9, 13, 0.58);
  color: var(--text);
}

.task-form input:focus {
  border-color: var(--line-strong);
}

textarea {
  display: block;
  width: 100%;
  min-height: 232px;
  resize: vertical;
  border: 1px solid rgba(151, 164, 181, 0.14);
  border-radius: 7px;
  outline: 0;
  padding: 14px;
  background: rgba(7, 9, 13, 0.58);
  color: var(--text);
  line-height: 1.65;
}

textarea:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.055);
}

.note-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.note-actions span {
  margin-right: auto;
}

.note-actions button {
  min-width: 64px;
  padding: 0 10px;
}

@media (max-width: 920px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .time-card {
    width: min(100%, 340px);
  }

  .work-section {
    grid-template-columns: 1fr;
  }

  .link-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tasks-card,
  .note-card {
    min-height: auto;
  }
}

@media (max-width: 740px) {
  .shell {
    width: min(100% - 22px, 1180px);
    padding-top: 22px;
  }

  .identity h1 {
    font-size: 30px;
  }

  .motto-line {
    align-items: flex-start;
  }

  .command-center {
    margin-top: 32px;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

  .search-support p {
    white-space: normal;
  }

  .link-groups {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .identity h1 {
    font-size: 26px;
  }

  .card,
  .time-card {
    padding: 14px;
  }

  .clock {
    font-size: 34px;
  }

  .search-panel input {
    font-size: 14px;
  }

  .links {
    grid-template-columns: 1fr;
  }

  .note-actions {
    flex-wrap: wrap;
  }

  .note-actions span {
    flex: 1 0 100%;
  }
}
