:root {
  color-scheme: light;
  --bg: #f2f4f1;
  --surface: #ffffff;
  --surface-soft: #f7f8f5;
  --ink: #16181d;
  --muted: #667064;
  --line: #d8ddd2;
  --line-strong: #b6beb0;
  --locker: #d7ddd6;
  --locker-dark: #465047;
  --locker-edge: #9aa59b;
  --locker-inner: #111b17;
  --accent: #164b3d;
  --accent-dark: #0f342c;
  --green: #0f7e5c;
  --amber: #a45e18;
  --red: #c23838;
  --code: #eef2ed;
  --shadow: 0 14px 34px rgba(32, 39, 34, 0.07);
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 50% -160px, rgba(22, 75, 61, 0.09), transparent 360px),
    linear-gradient(180deg, #fbfcf9 0%, var(--bg) 58%, #eaeee8 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

section[hidden] {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(217, 222, 215, 0.82);
  background: rgba(251, 252, 251, 0.84);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid var(--accent-dark);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    var(--accent-dark);
  color: #ffffff;
}

.brand small {
  display: block;
  white-space: nowrap;
}

.brand strong {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-size: 17px;
  line-height: 1.1;
}

.brand em {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(194, 56, 56, 0.22);
  border-radius: 999px;
  background: rgba(194, 56, 56, 0.08);
  color: var(--red);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
}

.language-switch svg {
  width: 17px;
  height: 17px;
}

.language-select {
  width: auto;
  min-width: 104px;
  height: 36px;
  padding: 0 30px 0 10px;
  border-color: var(--line);
  background-color: rgba(255, 255, 255, 0.74);
  color: #273244;
  font-size: 13px;
  font-weight: 760;
}

.locker-app {
  display: grid;
  gap: 14px;
  width: min(1180px, 100%);
  padding: clamp(10px, 1.8vw, 18px);
  margin: 0 auto;
}

.home-panel,
.module-panel,
.note-surface {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.home-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 14px;
  align-items: stretch;
  padding: clamp(12px, 2vw, 20px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), transparent 46%),
    linear-gradient(90deg, rgba(15, 52, 44, 0.04), transparent 58%),
    rgba(255, 255, 255, 0.94);
}

.home-panel::before {
  position: absolute;
  inset: auto -8% -46px;
  height: 110px;
  content: "";
  background:
    linear-gradient(90deg, transparent, rgba(28, 38, 32, 0.08), transparent),
    repeating-linear-gradient(90deg, rgba(45, 54, 47, 0.08) 0 1px, transparent 1px 44px);
  transform: perspective(380px) rotateX(56deg);
  transform-origin: bottom;
}

.home-panel > * {
  position: relative;
  z-index: 1;
}

.locker-strip {
  --locker-gap: clamp(6px, 1.1vw, 11px);
  --locker-pad: clamp(7px, 1.2vw, 13px);
  --door-width: calc((100% - (var(--locker-pad) * 2) - (var(--locker-gap) * 4)) / 5);
  --active-left: calc(var(--locker-pad) + var(--door-width) + var(--locker-gap));
  --active-width: var(--door-width);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--locker-gap);
  min-height: clamp(330px, 40vw, 490px);
  padding: var(--locker-pad);
  border: 1px solid rgba(150, 160, 150, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.5), transparent 18%, rgba(34, 44, 37, 0.09) 50%, transparent 84%),
    linear-gradient(180deg, #f4f5f1, #c9d1c9 72%, #b5c0b8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -28px 34px rgba(49, 59, 50, 0.13),
    0 18px 28px rgba(35, 43, 37, 0.09);
  perspective: 1650px;
}

.locker-selecting .locker-strip {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -28px 34px rgba(49, 59, 50, 0.13),
    0 18px 28px rgba(35, 43, 37, 0.09),
    0 0 0 4px rgba(15, 126, 92, 0.08);
}

.locker-strip::before {
  position: absolute;
  inset: var(--locker-pad);
  z-index: 0;
  border-radius: 6px;
  content: "";
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent calc(var(--door-width) - 1px),
      rgba(47, 58, 50, 0.16) calc(var(--door-width) - 1px),
      rgba(47, 58, 50, 0.16) var(--door-width),
      transparent var(--door-width),
      transparent calc(var(--door-width) + var(--locker-gap))
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 48%, rgba(37, 47, 40, 0.1));
  pointer-events: none;
}

.locker-strip::after {
  position: absolute;
  right: 6%;
  bottom: -18px;
  left: 6%;
  z-index: -1;
  height: 34px;
  border-radius: 999px;
  content: "";
  background: radial-gradient(ellipse at center, rgba(31, 38, 33, 0.24), transparent 68%);
  filter: blur(1px);
}

.locker-cavity {
  position: absolute;
  top: var(--locker-pad);
  bottom: var(--locker-pad);
  left: var(--active-left);
  z-index: 1;
  overflow: hidden;
  width: var(--active-width);
  border: 1px solid rgba(8, 14, 12, 0.7);
  border-radius: 7px;
  background:
    radial-gradient(circle at 52% 28%, rgba(255, 255, 255, 0.14), transparent 32%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.42), transparent 24%, rgba(255, 255, 255, 0.04) 48%, rgba(0, 0, 0, 0.3)),
    linear-gradient(180deg, #111a17, var(--locker-inner));
  box-shadow:
    inset 16px 0 18px rgba(0, 0, 0, 0.34),
    inset -10px 0 14px rgba(255, 255, 255, 0.03),
    inset 0 -24px 28px rgba(0, 0, 0, 0.38);
  opacity: 0;
  transform: scaleX(0.96);
  transition:
    opacity 0.22s ease,
    transform 0.42s cubic-bezier(0.2, 0.74, 0.24, 1);
}

.locker-cavity::before,
.locker-cavity::after {
  position: absolute;
  content: "";
}

.locker-cavity::before {
  inset: 16% 12% auto;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 92px rgba(255, 255, 255, 0.08),
    0 184px rgba(255, 255, 255, 0.05);
}

.locker-cavity::after {
  right: 10%;
  bottom: 10%;
  left: 10%;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(4, 8, 6, 0.72), transparent 68%);
}

.locker-parcel {
  position: absolute;
  right: 18%;
  bottom: 18%;
  left: 18%;
  height: 24%;
  border: 1px solid rgba(198, 210, 202, 0.3);
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 46%, rgba(102, 112, 100, 0.26) 46% 54%, transparent 54%),
    linear-gradient(180deg, #f6f3e7, #d9d2bf);
  box-shadow:
    0 14px 24px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  opacity: 0;
  transform: translateY(38px) scale(0.9);
}

.locker-door {
  position: relative;
  z-index: 2;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid var(--locker-edge);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0) 19%, rgba(32, 42, 35, 0.12) 100%),
    linear-gradient(180deg, rgba(247, 249, 245, 0.88), rgba(182, 194, 184, 0.98)),
    repeating-linear-gradient(0deg, transparent 0 20px, rgba(38, 48, 41, 0.035) 20px 21px),
    var(--locker);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 7px 0 0 rgba(255, 255, 255, 0.28),
    inset -12px 0 18px rgba(35, 45, 38, 0.12),
    inset 0 -26px 34px rgba(26, 38, 32, 0.12);
  transform-origin: left center;
  transform-style: preserve-3d;
  transition:
    transform 0.72s cubic-bezier(0.16, 0.82, 0.22, 1),
    box-shadow 0.28s ease,
    filter 0.28s ease;
  will-change: transform;
}

.locker-door::before,
.locker-door::after {
  position: absolute;
  content: "";
}

.locker-door::before {
  top: 12%;
  left: 15%;
  width: min(54px, 34%);
  height: min(54px, 17%);
  background:
    linear-gradient(180deg, rgba(68, 79, 70, 0.45) 0 3px, transparent 3px 10px) 0 0 / 100% 10px repeat-y;
}

.locker-door::after {
  right: 14%;
  bottom: 13%;
  left: 14%;
  height: 4px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(42, 52, 44, 0.22), transparent),
    rgba(255, 255, 255, 0.34);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.64);
}

.locker-door .door-label {
  position: absolute;
  right: 12%;
  top: 8%;
  display: none;
  min-width: 32px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(125, 137, 127, 0.55);
  border-radius: 4px;
  background: rgba(247, 249, 245, 0.82);
  color: rgba(53, 64, 56, 0.62);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 820;
}

.locker-door:nth-child(2) .door-label::before {
  content: "01";
}

.locker-door:nth-child(3) .door-label::before {
  content: "02";
}

.locker-door:nth-child(4) .door-label::before {
  content: "03";
}

.locker-door:nth-child(5) .door-label::before {
  content: "04";
}

.locker-door:nth-child(6) .door-label::before {
  content: "05";
}

.locker-door .door-hinge {
  position: absolute;
  left: 5px;
  top: 7%;
  bottom: 7%;
  width: 5px;
  border-radius: 999px;
  background:
    linear-gradient(
      180deg,
      transparent 0 8%,
      rgba(80, 91, 82, 0.44) 8% 25%,
      transparent 25% 43%,
      rgba(80, 91, 82, 0.38) 43% 62%,
      transparent 62% 100%
    );
}

.door-handle {
  position: absolute;
  right: 14%;
  top: 50%;
  display: grid;
  width: clamp(23px, 3.4vw, 36px);
  height: clamp(23px, 3.4vw, 36px);
  place-items: center;
  border: 2px solid rgba(39, 48, 42, 0.38);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(39, 48, 42, 0.78) 0 15%, transparent 17%),
    linear-gradient(180deg, #f4f6f2, #aab5aa);
  box-shadow:
    0 1px 1px rgba(255, 255, 255, 0.72),
    inset 0 1px 2px rgba(255, 255, 255, 0.62),
    inset 0 -3px 5px rgba(39, 48, 42, 0.18);
  transform: translateY(-50%);
  transform-origin: center;
}

.door-handle::after {
  width: 44%;
  height: 3px;
  border-radius: 999px;
  background: rgba(39, 48, 42, 0.54);
  content: "";
}

.locker-door.active {
  z-index: 4;
  border-color: rgba(15, 126, 92, 0.5);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 18%, rgba(20, 66, 54, 0.13) 100%),
    linear-gradient(180deg, rgba(239, 249, 243, 0.98), rgba(170, 210, 196, 0.96)),
    repeating-linear-gradient(0deg, transparent 0 20px, rgba(20, 66, 54, 0.038) 20px 21px),
    #cfe9df;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 7px 0 0 rgba(255, 255, 255, 0.3),
    0 0 0 5px rgba(15, 126, 92, 0.08),
    0 14px 24px rgba(15, 52, 44, 0.08);
}

.locker-door.active::before {
  border-top-color: rgba(15, 52, 44, 0.46);
  border-bottom-color: rgba(15, 52, 44, 0.46);
}

.locker-selecting .locker-cavity,
.locker-selecting .locker-parcel {
  opacity: 0;
}

.locker-selecting .locker-door {
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

.locker-selecting .locker-door.active {
  animation: locker-select-pulse 0.22s ease both;
  border-color: rgba(15, 126, 92, 0.72);
  filter: brightness(1.03) saturate(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 7px 0 0 rgba(255, 255, 255, 0.32),
    0 0 0 5px rgba(15, 126, 92, 0.12),
    0 18px 32px rgba(15, 52, 44, 0.12);
}

.locker-selecting .locker-door.active .door-handle {
  animation: locker-select-handle 0.22s ease both;
}

.locker-open .locker-door.active,
.locker-opening .locker-door.active {
  transform: rotateY(-84deg) translateX(-8px) translateZ(3px);
  filter: saturate(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset -24px 0 30px rgba(15, 52, 44, 0.22),
    30px 13px 32px rgba(15, 52, 44, 0.2);
}

.locker-opening .locker-door.active {
  animation: locker-open-door 1.16s cubic-bezier(0.16, 0.82, 0.2, 1) both;
}

.locker-open .locker-door.active .door-handle,
.locker-opening .locker-door.active .door-handle {
  transform: translateY(-50%) rotate(20deg);
}

.locker-opening .locker-door.active .door-handle {
  animation: locker-handle-open 1.16s ease both;
}

.locker-stowing .locker-door.active {
  animation: locker-stow 2.18s cubic-bezier(0.18, 0.82, 0.24, 1) both;
}

.locker-stowing .locker-door.active .door-label {
  animation: locker-label-click 2.18s ease both;
}

.locker-stowing .locker-door.active .door-handle {
  animation: locker-handle-stow 2.18s ease both;
}

.locker-depositing .locker-door.active {
  animation: locker-deposit 1.58s cubic-bezier(0.2, 0.72, 0.18, 1) both;
}

.locker-depositing .locker-door.active .door-label {
  animation: locker-label-click 1.58s ease both;
}

.locker-depositing .locker-door.active .door-handle {
  animation: locker-handle-deposit 1.58s ease both;
}

.locker-closing .locker-door.active {
  animation: locker-close 0.82s cubic-bezier(0.2, 0.72, 0.16, 1) both;
}

.locker-closing .locker-door.active .door-handle {
  animation: locker-handle-close 0.82s ease both;
}

.locker-closed .locker-door.active,
.locker-closing .locker-door.active {
  transform: rotateY(0deg);
}

.locker-open .locker-cavity,
.locker-opening .locker-cavity,
.locker-stowing .locker-cavity,
.locker-depositing .locker-cavity,
.locker-closing .locker-cavity {
  opacity: 1;
  transform: scaleX(1);
}

.locker-opening .locker-cavity {
  animation: locker-cavity-open 1.16s ease both;
}

.locker-stowing .locker-cavity {
  animation: locker-cavity-stow 2.18s ease both;
}

.locker-depositing .locker-cavity {
  animation: locker-cavity-deposit 1.58s ease both;
}

.locker-closing .locker-cavity {
  animation: locker-cavity-close 0.82s ease both;
}

.locker-open .locker-parcel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.locker-opening .locker-parcel {
  animation: locker-parcel-reveal 1.16s ease both;
}

.locker-stowing .locker-parcel {
  animation: locker-parcel-stow 2.18s ease both;
}

.locker-depositing .locker-parcel {
  animation: locker-parcel-deposit 1.58s ease both;
}

@keyframes locker-select-pulse {
  0% {
    transform: scale(0.985);
  }
  56% {
    transform: scale(1.012);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes locker-select-handle {
  0% {
    transform: translateY(-50%) rotate(-8deg);
  }
  100% {
    transform: translateY(-50%) rotate(0deg);
  }
}

@keyframes locker-open-door {
  0%,
  16% {
    transform: rotateY(0deg) translateX(0);
  }
  34% {
    transform: rotateY(-20deg) translateX(-2px);
  }
  78% {
    transform: rotateY(-88deg) translateX(-9px) translateZ(4px);
  }
  100% {
    transform: rotateY(-84deg) translateX(-8px) translateZ(3px);
  }
}

@keyframes locker-stow {
  0% {
    transform: rotateY(0deg);
  }
  14% {
    transform: rotateY(0deg);
  }
  32% {
    transform: rotateY(-84deg) translateX(-8px) translateZ(3px);
  }
  58% {
    transform: rotateY(-84deg) translateX(-8px) translateZ(3px);
  }
  76% {
    transform: rotateY(6deg) translateX(0);
  }
  88% {
    transform: rotateY(-2deg) translateX(0);
  }
  100% {
    transform: rotateY(0deg);
  }
}

@keyframes locker-deposit {
  0%,
  32% {
    transform: rotateY(-84deg) translateX(-8px) translateZ(3px);
  }
  66% {
    transform: rotateY(6deg) translateX(0);
  }
  82% {
    transform: rotateY(-2deg) translateX(0);
  }
  100% {
    transform: rotateY(0deg);
  }
}

@keyframes locker-label-click {
  0%,
  72% {
    filter: brightness(1);
  }
  82% {
    filter: brightness(1.16);
  }
  100% {
    filter: brightness(1);
  }
}

@keyframes locker-close {
  0% {
    transform: rotateY(-84deg) translateX(-8px) translateZ(3px);
  }
  70% {
    transform: rotateY(5deg);
  }
  86% {
    transform: rotateY(-2deg);
  }
  100% {
    transform: rotateY(0deg);
  }
}

@keyframes locker-handle-open {
  0%,
  16% {
    transform: translateY(-50%) rotate(0deg);
  }
  32%,
  100% {
    transform: translateY(-50%) rotate(20deg);
  }
}

@keyframes locker-handle-stow {
  0%,
  12% {
    transform: translateY(-50%) rotate(0deg);
  }
  22%,
  64% {
    transform: translateY(-50%) rotate(20deg);
  }
  78%,
  100% {
    transform: translateY(-50%) rotate(0deg);
  }
}

@keyframes locker-handle-deposit {
  0%,
  34% {
    transform: translateY(-50%) rotate(20deg);
  }
  68%,
  100% {
    transform: translateY(-50%) rotate(0deg);
  }
}

@keyframes locker-handle-close {
  0% {
    transform: translateY(-50%) rotate(20deg);
  }
  70%,
  100% {
    transform: translateY(-50%) rotate(0deg);
  }
}

@keyframes locker-cavity-open {
  0%,
  18% {
    opacity: 0;
    transform: scaleX(0.96);
  }
  38%,
  100% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes locker-cavity-stow {
  0%,
  12% {
    opacity: 0;
  }
  22%,
  68% {
    opacity: 1;
  }
  86%,
  100% {
    opacity: 0;
  }
}

@keyframes locker-cavity-deposit {
  0%,
  74% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes locker-cavity-close {
  0% {
    opacity: 1;
  }
  86%,
  100% {
    opacity: 0;
  }
}

@keyframes locker-parcel-reveal {
  0%,
  36% {
    opacity: 0;
    transform: translateY(28px) scale(0.92);
  }
  58%,
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes locker-parcel-stow {
  0%,
  30% {
    opacity: 0;
    transform: translateY(42px) scale(0.9);
  }
  44%,
  62% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  76%,
  100% {
    opacity: 0;
    transform: translateY(4px) scale(0.98);
  }
}

@keyframes locker-parcel-deposit {
  0% {
    opacity: 0;
    transform: translateY(42px) scale(0.9);
  }
  20%,
  50% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  74%,
  100% {
    opacity: 0;
    transform: translateY(4px) scale(0.98);
  }
}

.home-copy {
  display: grid;
  grid-template-columns: minmax(220px, 0.76fr) minmax(280px, 1fr);
  gap: 8px 18px;
  align-items: center;
  min-width: 0;
  padding: 0 4px 2px;
}

.kicker,
.eyebrow {
  margin: 0;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
}

.home-copy h1 {
  grid-column: 1;
  margin: 0;
  color: #111827;
  font-size: clamp(32px, 4.2vw, 50px);
  line-height: 1.02;
}

.home-line {
  grid-column: 1;
  margin: 0;
  max-width: 34em;
  color: #39453d;
  font-size: 15px;
  line-height: 1.6;
}

.burn-head,
.burn-points,
.burn-points span {
  display: flex;
  align-items: center;
}

.burn-head {
  grid-column: 2;
  gap: 8px;
  margin-top: 2px;
  color: #7b1f1f;
  font-size: 13px;
  font-weight: 760;
}

.burn-head svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--red);
}

.beta-notice {
  display: flex;
  grid-column: 2;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  gap: 8px;
  margin: -2px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(194, 56, 56, 0.18);
  border-radius: 8px;
  background: rgba(194, 56, 56, 0.07);
  color: #8f2c2c;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.beta-notice svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--red);
}

.burn-points {
  grid-column: 2;
  grid-row: 1 / span 2;
  flex-wrap: wrap;
  gap: 7px;
}

.burn-points span {
  min-height: 30px;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid rgba(185, 192, 184, 0.82);
  border-radius: 7px;
  background: var(--surface-soft);
  color: #344238;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.burn-points svg {
  width: 15px;
  height: 15px;
  color: var(--green);
}

.module-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: 12px;
  align-items: start;
}

.module-panel,
.note-surface {
  min-width: 0;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 251, 248, 0.96));
}

.module-head,
.pane-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.module-head h2,
.pane-head h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  line-height: 1.18;
}

.open-panel {
  display: grid;
  align-content: start;
}

.create-panel {
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.56), transparent 18%, rgba(34, 44, 37, 0.08) 100%),
    linear-gradient(180deg, rgba(247, 249, 245, 0.96), rgba(218, 225, 216, 0.96));
}

.open-panel {
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.58), transparent 18%, rgba(34, 44, 37, 0.08) 100%),
    linear-gradient(180deg, rgba(250, 251, 248, 0.98), rgba(227, 232, 224, 0.96));
}

.locker-action {
  display: grid;
  gap: 11px;
}

.locker-open-button {
  position: relative;
  display: flex;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 116px;
  width: 100%;
  border: 1px solid rgba(141, 153, 143, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.64), transparent 19%, rgba(20, 66, 54, 0.12) 100%),
    linear-gradient(180deg, rgba(239, 249, 243, 0.98), rgba(177, 211, 198, 0.98)),
    repeating-linear-gradient(0deg, transparent 0 20px, rgba(20, 66, 54, 0.038) 20px 21px);
  color: #13251f;
  font-size: 18px;
  font-weight: 880;
  box-shadow:
    inset 7px 0 0 rgba(255, 255, 255, 0.3),
    inset -14px 0 22px rgba(35, 45, 38, 0.1),
    inset 0 -20px 28px rgba(26, 38, 32, 0.1);
  transition:
    border-color 0.14s ease,
    box-shadow 0.14s ease,
    transform 0.14s ease;
}

.locker-open-button::before,
.locker-open-button::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.locker-open-button::before {
  left: 10px;
  top: 12px;
  bottom: 12px;
  width: 5px;
  border-radius: 999px;
  background:
    linear-gradient(
      180deg,
      transparent 0 10%,
      rgba(80, 91, 82, 0.44) 10% 28%,
      transparent 28% 45%,
      rgba(80, 91, 82, 0.38) 45% 64%,
      transparent 64% 100%
    );
}

.locker-open-button::after {
  right: 8%;
  bottom: 17%;
  left: 8%;
  height: 4px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(42, 52, 44, 0.22), transparent),
    rgba(255, 255, 255, 0.36);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.64);
}

.locker-open-button:hover {
  border-color: rgba(15, 126, 92, 0.56);
  box-shadow:
    inset 7px 0 0 rgba(255, 255, 255, 0.34),
    inset -14px 0 22px rgba(35, 45, 38, 0.1),
    inset 0 -20px 28px rgba(26, 38, 32, 0.1),
    0 12px 22px rgba(15, 52, 44, 0.1);
  transform: translateY(-1px);
}

.locker-open-button:focus-visible {
  outline: 0;
  box-shadow:
    inset 7px 0 0 rgba(255, 255, 255, 0.34),
    inset -14px 0 22px rgba(35, 45, 38, 0.1),
    inset 0 -20px 28px rgba(26, 38, 32, 0.1),
    0 0 0 4px rgba(15, 126, 92, 0.14);
}

.locker-open-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border: 2px solid rgba(39, 48, 42, 0.36);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(39, 48, 42, 0.74) 0 14%, transparent 16%),
    linear-gradient(180deg, #f8faf6, #aab5aa);
  box-shadow:
    0 1px 1px rgba(255, 255, 255, 0.72),
    inset 0 1px 2px rgba(255, 255, 255, 0.62),
    inset 0 -4px 6px rgba(39, 48, 42, 0.18);
}

.locker-open-icon svg {
  width: 22px;
  height: 22px;
  color: #203028;
}

.module-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  color: #7b1f1f;
  font-size: 12px;
  font-weight: 720;
  line-height: 1.5;
}

.module-note svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--red);
  transform: translateY(2px);
}

.open-form,
.create-form {
  display: grid;
  gap: 12px;
}

.open-form {
  align-content: start;
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.field.fill {
  min-height: 0;
}

label,
legend {
  color: #344238;
  font-size: 13px;
  font-weight: 760;
}

fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  outline: none;
  transition:
    border-color 0.14s ease,
    box-shadow 0.14s ease;
}

input {
  height: 46px;
  padding: 0 13px;
}

#openCode,
#createCode {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 820;
}

#openDialog #openCode {
  height: auto;
  padding: clamp(14px, 3vw, 24px) 12px;
  border-color: rgba(15, 52, 44, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 248, 244, 0.96));
  color: #10251f;
  font-size: clamp(48px, 9vw, 94px);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  box-shadow:
    inset 0 0 0 1px rgba(15, 126, 92, 0.12),
    0 16px 34px rgba(15, 52, 44, 0.09);
}

#openDialog #openButton {
  width: min(100%, 460px);
  justify-self: center;
}

textarea {
  min-height: 262px;
  padding: 13px;
  resize: vertical;
  line-height: 1.6;
}

#content {
  border-color: rgba(218, 188, 70, 0.44);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(146, 119, 42, 0.08) 30px 31px),
    #fff9d8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 10px 24px rgba(78, 65, 28, 0.08);
}

input:focus,
textarea:focus {
  border-color: rgba(15, 126, 92, 0.72);
  box-shadow: 0 0 0 4px rgba(15, 126, 92, 0.11);
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
}

.create-controls {
  display: grid;
  grid-template-columns: minmax(170px, 230px) minmax(220px, 1fr);
  gap: 12px;
  align-items: end;
}

.ttl-field {
  display: grid;
  gap: 7px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #eef2ed;
}

.segmented label {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 820;
  white-space: nowrap;
  user-select: none;
}

.segmented input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.segmented label:has(input:checked) {
  background: var(--surface);
  color: var(--ink);
  box-shadow:
    inset 0 0 0 1px rgba(15, 126, 92, 0.18),
    0 1px 8px rgba(32, 39, 34, 0.06);
}

.tool-row,
.result-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-row {
  justify-content: flex-end;
}

.attachment-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0 auto 0 0;
  color: #5f6b60;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.attachment-hint svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--green);
}

.create-dialog {
  width: min(760px, calc(100% - 28px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid rgba(150, 160, 150, 0.86);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  box-shadow: 0 28px 70px rgba(19, 28, 23, 0.24);
}

.compact-dialog {
  width: min(440px, calc(100% - 28px));
}

.open-code-dialog {
  width: min(760px, calc(100% - 28px));
}

.locker-result-dialog {
  width: min(820px, calc(100% - 28px));
}

.create-dialog::backdrop {
  background:
    linear-gradient(180deg, rgba(20, 30, 25, 0.18), rgba(20, 30, 25, 0.36)),
    rgba(14, 20, 17, 0.36);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.create-dialog[open] {
  animation: dialog-enter 0.42s cubic-bezier(0.16, 0.82, 0.2, 1) both;
}

.dialog-shell {
  display: grid;
  gap: 12px;
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 16px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.58), transparent 19%, rgba(34, 44, 37, 0.08) 100%),
    linear-gradient(180deg, #fbfcf9, #eef3ed);
}

.compact-dialog .dialog-shell {
  gap: 14px;
}

.open-code-shell {
  gap: 16px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.52), transparent 18%, rgba(34, 44, 37, 0.1) 100%),
    linear-gradient(180deg, #fbfcf9, #e8eee7);
}

.open-code-panel {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 190px;
  padding: clamp(18px, 3.2vw, 28px) clamp(14px, 3vw, 30px);
  border: 1px solid rgba(150, 160, 150, 0.74);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), transparent 48%),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(38, 48, 41, 0.035) 22px 23px),
    linear-gradient(180deg, #f7f9f4, #dce5dc);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    inset 8px 0 0 rgba(255, 255, 255, 0.26),
    inset -16px 0 24px rgba(35, 45, 38, 0.1);
  text-align: center;
}

.open-code-field {
  width: min(100%, 560px);
  justify-self: center;
}

.open-code-field label {
  color: #7b1f1f;
  text-align: center;
}

.locker-result-shell {
  gap: 16px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.52), transparent 18%, rgba(34, 44, 37, 0.1) 100%),
    linear-gradient(180deg, #fbfcf9, #e8eee7);
}

.result-head {
  align-items: center;
}

.receipt-view {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 420px;
  padding: clamp(22px, 4vw, 42px) clamp(14px, 3vw, 36px);
  border: 1px solid rgba(150, 160, 150, 0.74);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), transparent 48%),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(38, 48, 41, 0.035) 22px 23px),
    linear-gradient(180deg, #f7f9f4, #dce5dc);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    inset 8px 0 0 rgba(255, 255, 255, 0.26),
    inset -16px 0 24px rgba(35, 45, 38, 0.1);
  text-align: center;
}

.receipt-lock {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 2px solid rgba(39, 48, 42, 0.34);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(39, 48, 42, 0.74) 0 14%, transparent 16%),
    linear-gradient(180deg, #fbfcf8, #aab5aa);
  color: #1d2f27;
  box-shadow:
    0 12px 24px rgba(35, 45, 38, 0.14),
    inset 0 1px 2px rgba(255, 255, 255, 0.68),
    inset 0 -5px 8px rgba(39, 48, 42, 0.18);
}

.receipt-lock svg {
  width: 28px;
  height: 28px;
}

.receipt-kicker {
  margin: 2px 0 0;
  color: #7b1f1f;
  font-size: 14px;
  font-weight: 860;
}

.receipt-code {
  display: block;
  width: min(100%, 560px);
  padding: clamp(14px, 3vw, 24px) 12px;
  border: 1px solid rgba(15, 52, 44, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 248, 244, 0.96));
  color: #10251f;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(54px, 10vw, 104px);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  box-shadow:
    inset 0 0 0 1px rgba(15, 126, 92, 0.12),
    0 16px 34px rgba(15, 52, 44, 0.09);
}

.receipt-note {
  max-width: 48em;
  margin: 0;
  color: #38463d;
  font-size: 14px;
  font-weight: 680;
  line-height: 1.7;
}

.receipt-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  width: min(100%, 460px);
  margin-top: 4px;
}

.note-view {
  position: relative;
  display: grid;
  gap: 12px;
  padding: clamp(8px, 1.6vw, 14px);
  border: 1px solid rgba(150, 160, 150, 0.68);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.22)),
    #f2f5ef;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.note-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.note-view .markdown-preview {
  min-height: 210px;
}

.receipt-view[hidden],
.note-view[hidden] {
  display: none !important;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 2px;
}

.dialog-head h2 {
  margin: 2px 0 0;
  color: #111827;
  font-size: 22px;
  line-height: 1.18;
}

@keyframes dialog-enter {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.975);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.icon-button,
.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    transform 0.12s ease;
}

.icon-button {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-color: var(--line);
  background: var(--surface);
  color: #2c372f;
}

.icon-button:hover,
.secondary-button:hover,
.text-button:hover {
  border-color: var(--line-strong);
  background: #f4f7f2;
}

.primary-button,
.secondary-button {
  min-width: 96px;
  height: 46px;
  padding: 0 16px;
}

.primary-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.secondary-button {
  width: 100%;
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #ffffff;
}

.secondary-button:hover {
  background: #1d4b40;
}

.text-button {
  min-height: 36px;
  padding: 0 10px;
  border-color: var(--line);
  background: var(--surface);
  color: #263143;
}

.danger {
  color: var(--red);
}

.icon-button.danger.confirm-pending {
  width: auto;
  min-width: 112px;
  flex-basis: auto;
  border-color: var(--red);
  background: var(--red);
  color: #ffffff;
}

.icon-button.danger.confirm-pending::after {
  content: attr(data-confirm-label);
  font-size: 12px;
  font-weight: 860;
  white-space: nowrap;
}

.message {
  min-height: 21px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.message[data-tone="ok"] {
  color: var(--green);
}

.message[data-tone="warn"] {
  color: var(--amber);
}

.message[data-tone="error"] {
  color: var(--red);
}

.countdown {
  display: inline-flex;
  align-items: baseline;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  gap: 8px;
  padding: 7px 12px 8px;
  border: 1px solid rgba(194, 56, 56, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0)),
    #fff0f0;
  color: var(--red);
  font-variant-numeric: tabular-nums;
  box-shadow:
    inset 0 0 0 1px rgba(194, 56, 56, 0.08),
    0 8px 20px rgba(194, 56, 56, 0.08);
}

.countdown-time {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(32px, 5.6vw, 48px);
  font-weight: 920;
  line-height: 0.92;
}

.countdown-suffix {
  min-width: 0;
  color: #8f2c2c;
  font-size: 12px;
  font-weight: 820;
  line-height: 1.15;
  white-space: nowrap;
}

.inside-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(150, 160, 150, 0.64);
  border-radius: 8px;
  background: rgba(247, 249, 245, 0.82);
  color: #59645b;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.45;
}

.inside-warning svg {
  flex: 0 0 auto;
  color: #8f2c2c;
  width: 16px;
  height: 16px;
}

.result-toolbar {
  justify-content: flex-end;
  margin: 0;
}

.markdown-preview {
  position: relative;
  overflow: auto;
  min-height: 250px;
  max-height: 620px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 248, 0.98));
  color: #151a23;
  line-height: 1.72;
}

.note-view .markdown-preview {
  padding: 22px 18px 18px;
  border-color: rgba(218, 188, 70, 0.54);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0) 40%),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(146, 119, 42, 0.075) 31px 32px),
    #fff8cf;
  box-shadow:
    0 16px 34px rgba(78, 65, 28, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.note-view .markdown-preview::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 8px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, #f4cf4e, #ffdf69 48%, #e9bf39);
  content: "";
}

.markdown-preview > :first-child {
  margin-top: 0;
}

.markdown-preview > :last-child {
  margin-bottom: 0;
}

.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3 {
  margin: 1.1em 0 0.45em;
  color: #111827;
  line-height: 1.22;
}

.markdown-preview h1 {
  font-size: 25px;
}

.markdown-preview h2 {
  font-size: 20px;
}

.markdown-preview h3 {
  font-size: 17px;
}

.markdown-preview p {
  margin: 0.8em 0;
}

.markdown-preview a {
  color: var(--accent-dark);
  text-underline-offset: 3px;
}

.markdown-preview img {
  display: block;
  max-width: 100%;
  max-height: 560px;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: #f8fafc;
}

.attachment-preview {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.attachment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.attachment-meta {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.attachment-meta strong {
  overflow: hidden;
  color: #263143;
  font-size: 13px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-meta small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  flex: 0 0 auto;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--accent-dark);
  border-radius: 8px;
  background: var(--accent-dark);
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 840;
  text-decoration: none;
  white-space: nowrap;
}

.attachment-download:hover {
  background: #1d4b40;
}

.attachment-download svg {
  width: 15px;
  height: 15px;
}

.attachment-preview video {
  display: block;
  width: 100%;
  max-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
}

.attachment-preview audio {
  display: block;
  width: 100%;
}

.file-attachment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: #263143;
  text-decoration: none;
}

.file-attachment::before {
  content: "";
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(180deg, transparent 41%, var(--green) 41%, var(--green) 54%, transparent 54%),
    linear-gradient(90deg, transparent 42%, var(--green) 42%, var(--green) 58%, transparent 58%),
    #e8eee9;
  color: var(--green);
  font-weight: 820;
}

.file-attachment span {
  min-width: 0;
  overflow: hidden;
  flex: 1 1 auto;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-attachment small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.markdown-preview blockquote {
  margin: 1em 0;
  padding: 10px 14px;
  border-left: 3px solid var(--green);
  background: #f1f7f4;
  color: #364152;
}

.markdown-preview ul,
.markdown-preview ol {
  padding-left: 1.4em;
}

.markdown-preview code {
  padding: 2px 5px;
  border-radius: 6px;
  background: var(--code);
  color: #0f172a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.markdown-preview pre {
  overflow: auto;
  padding: 14px;
  border-radius: 8px;
  background: #111827;
  color: #f8fafc;
}

.markdown-preview pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.empty-preview {
  display: grid;
  min-height: 210px;
  place-items: center;
  gap: 10px;
  color: #98a2b3;
}

.empty-preview svg {
  width: 34px;
  height: 34px;
}

.code-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
}

.code-strip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

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

  .locker-strip {
    min-height: clamp(260px, 56vw, 380px);
  }

  .home-copy {
    grid-template-columns: 1fr;
  }

  .home-copy h1,
  .home-line,
  .burn-head,
  .beta-notice,
  .burn-points {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 620px) {
  .topbar {
    padding: 9px 12px;
  }

  .locker-app {
    gap: 12px;
    padding: 12px;
  }

  .home-panel,
  .module-panel {
    padding: 12px;
  }

  .locker-strip {
    --locker-gap: 5px;
    --locker-pad: 6px;
    --mobile-side-width: clamp(54px, 17vw, 68px);
    --mobile-active-width: minmax(150px, 1fr);
    --door-width: calc(100% - (var(--locker-pad) * 2) - (var(--mobile-side-width) * 2) - (var(--locker-gap) * 2));
    --active-left: calc(var(--locker-pad) + var(--mobile-side-width) + var(--locker-gap));
    grid-template-columns: var(--mobile-side-width) var(--mobile-active-width) var(--mobile-side-width);
    min-height: clamp(280px, 86vw, 380px);
  }

  .locker-strip::before {
    background:
      repeating-linear-gradient(
        90deg,
        transparent 0,
        transparent calc(var(--mobile-side-width) - 1px),
        rgba(47, 58, 50, 0.16) calc(var(--mobile-side-width) - 1px),
        rgba(47, 58, 50, 0.16) var(--mobile-side-width),
        transparent var(--mobile-side-width),
        transparent calc(var(--mobile-side-width) + var(--locker-gap))
      ),
      linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 48%, rgba(37, 47, 40, 0.1));
  }

  .locker-door.far-door {
    display: none;
  }

  .locker-door.side-door {
    filter: saturate(0.88);
  }

  .locker-open .locker-door.active,
  .locker-opening .locker-door.active {
    transform: rotateY(-78deg) translateX(-8px) translateZ(3px);
  }

  .locker-opening .locker-door.active {
    animation-name: locker-open-door-mobile;
  }

  .locker-stowing .locker-door.active {
    animation-name: locker-stow-mobile;
  }

  .locker-depositing .locker-door.active {
    animation-name: locker-deposit-mobile;
  }

  .locker-closing .locker-door.active {
    animation-name: locker-close-mobile;
  }

  .locker-door::before {
    left: 13%;
    width: min(34px, 34%);
    height: min(38px, 16%);
  }

  .locker-door .door-hinge {
    left: 3px;
    width: 3px;
  }

  .locker-door .door-label {
    right: 9%;
    min-width: 24px;
    height: 19px;
    font-size: 10px;
  }

  .door-handle {
    right: 10%;
    width: 23px;
    height: 23px;
  }

  .home-copy h1 {
    font-size: 36px;
  }

  .create-controls {
    grid-template-columns: 1fr;
  }

  .locker-open-button {
    min-height: 104px;
  }

  .create-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
  }

  .dialog-shell {
    max-height: calc(100dvh - 20px);
    padding: 12px;
  }

  .open-code-panel {
    min-height: 176px;
    padding: 18px 14px;
  }

  .tool-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .attachment-hint {
    align-items: flex-start;
  }

  .tool-row .primary-button {
    grid-column: 1 / -1;
    justify-content: center;
    width: 100%;
  }

  textarea {
    min-height: 220px;
  }

  .pane-head {
    align-items: stretch;
    flex-direction: column;
  }

  .note-status-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .countdown {
    min-height: 44px;
  }

  .countdown-time {
    font-size: 36px;
  }

  .receipt-actions {
    grid-template-columns: 1fr;
  }
}

@keyframes locker-open-door-mobile {
  0%,
  16% {
    transform: rotateY(0deg) translateX(0);
  }
  34% {
    transform: rotateY(-18deg) translateX(-2px);
  }
  78% {
    transform: rotateY(-82deg) translateX(-9px) translateZ(4px);
  }
  100% {
    transform: rotateY(-78deg) translateX(-8px) translateZ(3px);
  }
}

@keyframes locker-stow-mobile {
  0%,
  14% {
    transform: rotateY(0deg);
  }
  32%,
  58% {
    transform: rotateY(-78deg) translateX(-8px) translateZ(3px);
  }
  76% {
    transform: rotateY(6deg) translateX(0);
  }
  88% {
    transform: rotateY(-2deg) translateX(0);
  }
  100% {
    transform: rotateY(0deg);
  }
}

@keyframes locker-deposit-mobile {
  0%,
  32% {
    transform: rotateY(-78deg) translateX(-8px) translateZ(3px);
  }
  66% {
    transform: rotateY(6deg) translateX(0);
  }
  82% {
    transform: rotateY(-2deg) translateX(0);
  }
  100% {
    transform: rotateY(0deg);
  }
}

@keyframes locker-close-mobile {
  0% {
    transform: rotateY(-78deg) translateX(-8px) translateZ(3px);
  }
  70% {
    transform: rotateY(5deg);
  }
  86% {
    transform: rotateY(-2deg);
  }
  100% {
    transform: rotateY(0deg);
  }
}

@media (max-width: 430px) {
  .topbar {
    min-height: 56px;
  }

  .brand small {
    display: none;
  }

  .language-select {
    min-width: 92px;
    padding-left: 8px;
  }

  .language-switch svg {
    display: none;
  }

  .burn-points {
    display: grid;
    grid-template-columns: 1fr;
  }

  .burn-points span {
    justify-content: flex-start;
    white-space: normal;
  }

  .burn-head {
    align-items: flex-start;
  }

  .segmented label {
    padding: 0 4px;
    font-size: 12px;
  }

  .result-toolbar {
    width: 100%;
    justify-content: stretch;
  }

  .result-toolbar .icon-button {
    flex: 1 1 0;
  }

  .code-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .attachment-head {
    align-items: stretch;
    flex-direction: column;
  }

  .attachment-download {
    width: 100%;
  }

  .file-attachment {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .file-attachment small {
    width: 100%;
    padding-left: 40px;
  }

  .file-attachment .attachment-download {
    width: calc(100% - 40px);
    margin-left: 40px;
  }
}
