@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Oswald:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --ink: #f2ede7;
  --muted: #9c9690;
  --canvas: #121212;
  --panel: #1c1b1b;
  --panel-raised: #242323;
  --line: #393434;
  --red: #df3030;
  --gold: #d3a84f;
  --heading: 'Oswald', Impact, sans-serif;
  --body: 'DM Sans', 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: var(--body);
  background-color: var(--canvas);
  background-image: linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: 34px 34px;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

/* ══════════════════════════════════════════
   TOP BAR
   ══════════════════════════════════════════ */
.topbar {
  min-height: 72px;
  padding: 0 clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #101010;
  border-bottom: 1px solid #302c2a;
  position: relative;
  z-index: 100;
}

.topbar--transparent {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(16, 16, 16, .7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(48, 44, 42, .5);
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-mark {
  color: var(--red);
  font-size: 29px;
  line-height: 1;
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-copy strong {
  font: 600 14px/1 var(--heading);
  letter-spacing: .1em;
}

.brand-copy small {
  color: #a39a91;
  font-size: 8px;
  letter-spacing: .16em;
}

.topbar-nav {
  display: flex;
  gap: 6px;
  align-items: center;
}

.topbar-link {
  padding: 6px 14px;
  font: 600 11px var(--heading);
  letter-spacing: .12em;
  color: #a49b92;
  border: 1px solid transparent;
  transition: color .2s, border-color .2s;
}

.topbar-link:hover {
  color: #fff;
}

.topbar-link.is-active {
  color: var(--gold);
  border-bottom: 2px solid var(--red);
}

.edition {
  flex: 0 0 auto;
  color: #a49b92;
  font: 600 10px var(--heading);
  letter-spacing: .16em;
}

.edition span {
  margin-left: 7px;
  color: var(--gold);
}

/* ══════════════════════════════════════════
   LANDING PAGE — HERO
   ══════════════════════════════════════════ */
.landing-hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 130px clamp(24px, 6vw, 100px) 44px;
  overflow: hidden;
  isolation: isolate;
}

.landing-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.landing-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.landing-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg,
      rgba(10, 10, 10, .97) 0%,
      rgba(10, 10, 10, .88) 38%,
      rgba(10, 10, 10, .5) 62%,
      rgba(10, 10, 10, .2) 85%,
      transparent 100%),
    linear-gradient(0deg,
      rgba(10, 10, 10, .95) 0%,
      rgba(10, 10, 10, .4) 30%,
      transparent 60%);
}

.landing-hero__content {
  max-width: 680px;
  padding-top: clamp(20px, 4vh, 60px);
}

.landing-hero__kicker {
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  font: 700 11px var(--heading);
  letter-spacing: .2em;
}

.kicker-line {
  width: 32px;
  height: 2px;
  background: var(--red);
}

.landing-hero__title {
  margin: 0 0 20px;
  font: 700 clamp(48px, 7.5vw, 88px)/0.95 var(--heading);
  letter-spacing: .02em;
  text-transform: uppercase;
}

.landing-hero__title em {
  color: var(--red);
  font-style: normal;
  font-size: .55em;
  letter-spacing: .08em;
}

.landing-hero__desc {
  max-width: 480px;
  margin: 0 0 32px;
  color: #c9c1b8;
  font-size: 14px;
  line-height: 1.7;
}

.landing-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 34px;
  background: var(--red);
  color: #fff;
  font: 700 12px var(--heading);
  letter-spacing: .15em;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 6px 20px rgba(223, 48, 48, 0.35);
  transition: background .2s, transform .2s, box-shadow .2s;
}

.landing-hero__cta:hover {
  background: #b02828;
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(223, 48, 48, 0.5);
}

.cta-arrow {
  font-size: 18px;
  animation: float 2s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(5px);
  }
}

/* ══════════════════════════════════════════
   HERO SLOGANS — INTEGRATED TACTICAL HUD
   ══════════════════════════════════════════ */
.hero-slogans {
  margin-top: clamp(40px, 6vh, 80px);
  max-width: 980px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  background: linear-gradient(135deg, rgba(24, 22, 21, 0.88), rgba(15, 14, 14, 0.92));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(211, 168, 79, 0.28);
  border-left: 3px solid var(--red);
  padding: 16px 26px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
  position: relative;
}

.hero-slogans::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 14px;
  height: 14px;
  border-top: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
}

.hero-slogan {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 12px;
  transition: transform 0.2s ease;
}

.hero-slogan:hover {
  transform: translateY(-2px);
}

.hero-slogan__kanji {
  font-size: clamp(34px, 3.2vw, 44px);
  font-weight: 700;
  line-height: 1;
  color: #fff;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  flex-shrink: 0;
}

.hero-slogan__kanji--red {
  color: var(--red);
  text-shadow: 0 0 16px rgba(223, 48, 48, 0.45);
}

.hero-slogan__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hero-slogan__romaji {
  font: 700 14px/1 var(--heading);
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
}

.hero-slogan__meaning {
  font-size: 12px;
  font-weight: 500;
  color: #d8d0c7;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.hero-slogans__sep {
  width: 1px;
  height: 42px;
  background: linear-gradient(180deg, transparent, rgba(211, 168, 79, 0.45), transparent);
}

/* ══════════════════════════════════════════
   SECTION COMMON TYPOGRAPHY
   ══════════════════════════════════════════ */
.section-eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font: 700 10px var(--heading);
  letter-spacing: .2em;
}

.section-title {
  margin: 0 0 10px;
  font: 600 clamp(30px, 4vw, 48px)/1.05 var(--heading);
  letter-spacing: .02em;
}

.section-title em {
  color: var(--red);
  font-style: normal;
}

.section-subtitle {
  max-width: 520px;
  margin: 0 0 40px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

/* ══════════════════════════════════════════
   ABOUT SECTION
   ══════════════════════════════════════════ */
.about-section {
  padding: 80px clamp(20px, 6vw, 80px);
}

.about-section__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 48px;
  align-items: center;
}

.about-section__text p:not(.section-eyebrow) {
  color: #c0b8af;
  font-size: 13px;
  line-height: 1.8;
  margin: 0 0 16px;
}

.about-stats {
  margin-top: 32px;
  display: flex;
  gap: 36px;
}

.about-stat {
  text-align: center;
}

.about-stat__number {
  display: block;
  font: 700 clamp(28px, 3vw, 40px)/1 var(--heading);
  color: var(--gold);
}

.about-stat__label {
  margin-top: 6px;
  display: block;
  font: 600 9px var(--heading);
  letter-spacing: .15em;
  color: var(--muted);
}

.about-section__image {
  border: 1px solid #3a3230;
  overflow: hidden;
}

.about-section__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s;
}

.about-section__image:hover img {
  transform: scale(1.03);
}

/* ══════════════════════════════════════════
   MATERI PREVIEW
   ══════════════════════════════════════════ */
.materi-preview {
  padding: 80px clamp(20px, 6vw, 80px);
  background: #0e0e0e;
  border-top: 1px solid #2a2525;
}

.materi-preview__inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.materi-preview__inner .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.materi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
  text-align: left;
}

@media (min-width: 1080px) {
  .materi-card--wide {
    grid-column: span 2;
  }
}

.materi-card {
  padding: 28px 20px 24px;
  background: linear-gradient(155deg, #1f1d1c, #151414);
  border: 1px solid #3d3530;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color .25s, transform .25s;
}

.materi-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
}

.materi-card__icon {
  font-size: 28px;
  margin-bottom: 14px;
}

.materi-card__title {
  margin: 0 0 4px;
  font: 600 15px var(--heading);
  letter-spacing: .03em;
  color: var(--ink);
}

.materi-card__code {
  margin: 0 0 10px;
  font: 700 10px var(--heading);
  letter-spacing: .15em;
  color: var(--gold);
}

.materi-card__desc {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  flex: 1;
}

.materi-card__arrow {
  position: absolute;
  top: 20px;
  right: 18px;
  color: var(--muted);
  font-size: 18px;
  transition: color .2s, transform .2s;
}

.materi-card:hover .materi-card__arrow {
  color: var(--gold);
  transform: translateX(4px);
}

.materi-card-chips {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.materi-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: rgba(211, 168, 79, 0.12);
  border: 1px solid rgba(211, 168, 79, 0.35);
  color: #f0d28b;
  font: 700 10px var(--heading);
  letter-spacing: .08em;
  transition: background .2s, border-color .2s;
}

.materi-card:hover .materi-chip {
  background: rgba(211, 168, 79, 0.22);
  border-color: var(--gold);
}

.materi-preview__cta {
  text-align: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: var(--red);
  color: #fff;
  font: 700 12px var(--heading);
  letter-spacing: .15em;
  border: 1px solid rgba(255, 255, 255, .12);
  transition: background .2s, transform .2s;
}

.btn-primary:hover {
  background: #b02828;
  transform: translateY(-2px);
}

.btn-primary span {
  font-size: 16px;
}

/* ══════════════════════════════════════════
   MATERI PAGE — HERO (SMALLER)
   ══════════════════════════════════════════ */
.hero {
  min-height: 230px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 35px clamp(25px, 8vw, 115px);
  background: #171313 url("assets/banzai-cover.jpg") center 42% / cover no-repeat;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(13, 12, 12, .98), rgba(13, 12, 12, .88) 43%, rgba(13, 12, 12, .34) 78%, rgba(13, 12, 12, .12)), linear-gradient(0deg, rgba(14, 12, 12, .42), transparent 55%);
}

.hero-content {
  max-width: 650px;
}

.hero-kicker {
  margin: 0 0 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .19em;
}

.hero-kicker span {
  width: 20px;
  height: 2px;
  background: var(--red);
}

.hero h1 {
  margin: 0 0 7px;
  font: 600 clamp(35px, 5vw, 54px)/1 var(--heading);
  letter-spacing: .015em;
  text-transform: uppercase;
}

.hero h1 em {
  color: var(--red);
  font-style: normal;
}

.hero-content>p:not(.hero-kicker) {
  max-width: 450px;
  margin: 0;
  color: #c9c1b8;
  font-size: 11px;
  line-height: 1.65;
}

.hero-link {
  margin-top: 13px;
  display: inline-flex;
  gap: 14px;
  align-items: center;
  color: #f0d496;
  font: 600 10px var(--heading);
  letter-spacing: .1em;
}

.hero-link span {
  color: var(--red);
  font-size: 15px;
}

.hero-motto {
  position: absolute;
  right: clamp(20px, 7vw, 100px);
  bottom: 20px;
  color: rgba(255, 255, 255, .85);
  font: 500 15px var(--heading);
  letter-spacing: .15em;
}

/* ══════════════════════════════════════════
   WORKSPACE / SIDEBAR / LIBRARY
   ══════════════════════════════════════════ */
.workspace {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 28px clamp(18px, 4vw, 58px) 48px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  flex: 1;
}

.sidebar {
  min-height: 500px;
  padding: 12px 0 0;
  display: flex;
  flex-direction: column;
}

.side-label,
.eyebrow {
  color: #a59b91;
  font: 600 10px var(--heading);
  letter-spacing: .18em;
}

.side-label {
  margin: 9px 0 13px 10px;
}

.category-nav {
  display: grid;
  gap: 7px;
}

.category-group {
  display: grid;
  gap: 5px;
}

.category-subnav {
  display: grid;
  gap: 4px;
  padding-left: 12px;
  margin-left: 10px;
  border-left: 2px solid rgba(211, 168, 79, 0.28);
}

.category-button {
  min-height: 53px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #423a35;
  background: rgba(31, 29, 28, .94);
  color: #c2bbb4;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.category-button:hover {
  border-color: #9b7840;
  color: #fff;
}

.category-button.is-active {
  border-color: var(--gold);
  background: #29231d;
  color: #f0d28b;
  box-shadow: inset 3px 0 var(--red);
}

.category-subbutton {
  min-height: 42px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #3c342f;
  background: rgba(22, 20, 19, 0.95);
  color: #bab1a8;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.category-subbutton:hover {
  border-color: #9b7840;
  color: #fff;
  background: #2b2520;
}

.category-subbutton.is-active {
  border-color: var(--gold);
  background: #2e261f;
  color: #f0d28b;
  box-shadow: inset 3px 0 var(--red);
}

.category-subbutton .subnav-bullet {
  color: var(--gold);
  font-size: 13px;
  line-height: 1;
}

.category-subbutton .category-name {
  font: 600 12px/1.1 var(--heading);
  letter-spacing: .02em;
}

.category-icon {
  width: 25px;
  flex: 0 0 auto;
  color: #a9a19a;
  font-size: 19px;
  text-align: center;
}

.category-button.is-active .category-icon {
  color: var(--gold);
}

.category-name {
  flex: 1;
  font: 600 14px/1.05 var(--heading);
  letter-spacing: .025em;
}

.category-count {
  color: #938a82;
  font-size: 9px;
}

.side-note {
  margin: auto 0 0;
  padding: 16px 10px 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #302a27;
}

.side-note-mark {
  color: var(--red);
  font-size: 27px;
}

.side-note p {
  margin: 0;
  color: #8e857d;
  font: 600 10px/1.7 var(--heading);
  letter-spacing: .15em;
}

.library {
  min-width: 0;
}

.search-row {
  min-height: 44px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-box {
  width: min(540px, 100%);
  height: 41px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #48403b;
  border-radius: 2px;
  background: #1c1a19;
}

.search-box:focus-within {
  border-color: var(--gold);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
}

.search-box input::placeholder {
  color: #8f8881;
}

.search-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  position: relative;
  border: 1.7px solid #aaa198;
  border-radius: 50%;
}

.search-icon::after {
  content: "";
  width: 5px;
  height: 1.5px;
  position: absolute;
  right: -4px;
  bottom: -2px;
  background: #aaa198;
  transform: rotate(45deg);
}

.add-button,
.save-button {
  min-height: 41px;
  padding: 0 15px;
  border: 1px solid #7e332c;
  border-radius: 2px;
  background: #8f2825;
  color: #fff1e2;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.add-button:hover,
.save-button:hover {
  border-color: #ed6b57;
  background: #b02c28;
}

.add-button span {
  margin-right: 5px;
  color: #ffe2a2;
  font-size: 16px;
  vertical-align: -1px;
}

.section-heading {
  min-height: 58px;
  margin: 0 0 15px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--red);
}

.section-heading h1 {
  margin: 0;
  font: 600 clamp(27px, 3.2vw, 37px)/1 var(--heading);
  letter-spacing: .025em;
}

.section-heading h1 span {
  color: #c0b5aa;
  font-size: .78em;
}

.document-total {
  padding-bottom: 4px;
  color: #a69b90;
  font: 600 10px var(--heading);
  letter-spacing: .13em;
}

.status-message {
  min-height: 17px;
  margin: 0 0 7px;
  color: #ff9185;
  font-size: 10px;
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.document-card {
  min-height: 168px;
  padding: 12px 12px 10px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, rgba(40, 37, 35, .98), rgba(25, 24, 23, .98));
  border: 1px solid #665845;
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 0 100%);
  transition: border-color .16s ease, transform .16s ease;
}

.document-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.document-card::after {
  content: "";
  width: 1px;
  height: 14px;
  position: absolute;
  top: 0;
  right: 6px;
  background: #98845c;
  transform: rotate(-45deg);
  transform-origin: top;
}

.document-topline {
  min-height: 21px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.document-type {
  max-width: 100%;
  padding: 3px 7px 2px;
  background: #c6a24e;
  color: #1a1713;
  font: 700 10px var(--heading);
  letter-spacing: .07em;
}

.document-type[data-type="BAHAN AJAR"] {
  background: #b83b34;
  color: #fff;
}

.document-type[data-type="SOP"] {
  background: #544338;
  color: #f4d18b;
}

.document-type[data-type="REFERENSI"] {
  background: #494440;
  color: #ddd4c9;
}

.remove-button {
  padding: 2px 5px;
  border: 0;
  background: transparent;
  color: #9b9187;
  font-size: 12px;
  cursor: pointer;
}

.remove-button:hover {
  color: #ff9188;
}

.document-title {
  margin: 0 0 7px;
  color: #f3eee8;
  font: 500 17px/1.12 var(--heading);
  letter-spacing: .015em;
}

.document-path {
  margin: 0 0 12px;
  overflow: hidden;
  color: #aaa097;
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-path span {
  color: #d8b260;
}

.document-footer {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  border-top: 1px solid rgba(176, 157, 131, .2);
}

.document-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.file-info {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #aaa097;
  font: 600 9px var(--heading);
  letter-spacing: .04em;
}

.pdf-icon {
  color: #db6258;
  font-size: 14px;
}

.link-state {
  overflow: hidden;
  color: #d4ae62;
  font: 600 8px var(--heading);
  letter-spacing: .04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-state.is-linked {
  color: #8fc9a1;
}

.link-state.is-empty {
  color: #8e857d;
}

.document-action {
  min-height: 26px;
  padding: 0 10px;
  flex: 0 0 auto;
  border-radius: 2px;
  font: 700 9px var(--heading);
  letter-spacing: .06em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.document-action.is-linked {
  border: 1px solid #9a7d43;
  background: #852d29;
  color: #ffe0d5;
  cursor: pointer;
}

.document-action.is-linked:hover {
  background: #a73a34;
  border-color: var(--gold);
  color: #fff;
}

.document-action.is-disabled {
  border: 1px solid #3d3631;
  background: rgba(26, 23, 22, 0.85);
  color: #7a7169;
  cursor: not-allowed;
  user-select: none;
  pointer-events: none;
  letter-spacing: .04em;
}

.empty-state {
  min-height: 270px;
  padding: 36px 20px;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  border: 1px dashed #51473f;
  background: rgba(27, 24, 22, .82);
}

.empty-mark {
  margin-bottom: 12px;
  color: var(--red);
  font-size: 28px;
}

.empty-state h2 {
  margin: 0 0 8px;
  font: 500 22px var(--heading);
}

.empty-state p {
  max-width: 390px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.empty-note {
  color: var(--muted);
  text-align: center;
}

.no-results {
  grid-column: 1 / -1;
  padding: 42px 18px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */
.footer {
  min-height: 40px;
  padding: 10px clamp(20px, 5vw, 72px);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #302a27;
  background: rgba(12, 12, 12, .9);
  color: #8a8077;
  font: 600 9px var(--heading);
  letter-spacing: .12em;
}

.footer span:last-child {
  color: #bd9a57;
}

/* ══════════════════════════════════════════
   DIALOG
   ══════════════════════════════════════════ */
.material-dialog {
  width: min(560px, calc(100% - 26px));
  max-height: min(90vh, 830px);
  padding: 25px;
  overflow-y: auto;
  border: 1px solid #66533b;
  border-radius: 2px;
  background: #1b1918;
  color: var(--ink);
  box-shadow: 0 20px 70px rgba(0, 0, 0, .7);
}

.material-dialog::backdrop {
  background: rgba(0, 0, 0, .8);
  backdrop-filter: blur(3px);
}

.dialog-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.dialog-heading h2 {
  margin: 0;
  font: 500 29px var(--heading);
}

.close-button {
  width: 30px;
  height: 30px;
  border: 1px solid #48403b;
  background: transparent;
  color: #b6aea6;
  font-size: 20px;
  cursor: pointer;
}

.dialog-intro {
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.form-field {
  min-width: 0;
  margin-bottom: 13px;
  display: grid;
  gap: 6px;
}

.form-field>span {
  color: #d0c7be;
  font-size: 10px;
  font-weight: 600;
}

.form-field input,
.form-field select {
  width: 100%;
  min-height: 39px;
  padding: 0 10px;
  border: 1px solid #49413b;
  border-radius: 2px;
  outline: 0;
  background: #121110;
  color: var(--ink);
  font-size: 10px;
}

.form-field input:focus,
.form-field select:focus {
  border-color: var(--gold);
}

.form-field input::placeholder {
  color: #807870;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-hint {
  margin: -3px 0 9px;
  color: #9b9187;
  font-size: 9px;
}

.form-error {
  min-height: 14px;
  margin: 0;
  color: #ff9a91;
  font-size: 10px;
}

.dialog-actions {
  margin-top: 12px;
  display: flex;
  justify-content: end;
  gap: 9px;
}

.secondary-button {
  min-height: 39px;
  padding: 0 14px;
  border: 1px solid #4d4540;
  background: transparent;
  color: #c3bbb2;
  font-size: 10px;
  cursor: pointer;
}

.save-button {
  min-height: 39px;
}

.visually-hidden {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  position: absolute;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 1000px) {
  .workspace {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
    padding-right: 20px;
    padding-left: 20px;
  }

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

  .about-section__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-section__image {
    max-width: 400px;
  }

  .hero-slogan__meaning {
    white-space: normal;
  }
}

@media (max-width: 820px) {
  .hero-slogans {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 18px;
    margin-top: 32px;
  }

  .hero-slogans__sep {
    display: none;
  }

  .hero-slogan {
    padding: 6px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .hero-slogan:last-child {
    border-bottom: none;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 62px;
    padding: 0 14px;
  }

  .brand {
    gap: 8px;
  }

  .brand-logo {
    height: 34px;
  }

  .brand-mark {
    font-size: 25px;
  }

  .brand-copy strong {
    font-size: 11px;
  }

  .brand-copy small {
    font-size: 7px;
  }

  .topbar-nav {
    gap: 2px;
  }

  .topbar-link {
    padding: 6px 8px;
    font-size: 10px;
  }

  .edition {
    max-width: 115px;
    font-size: 9px;
    text-align: right;
    line-height: 1.3;
  }

  .landing-hero {
    min-height: 100vh;
    padding: 100px 20px 40px;
  }

  .landing-hero__title {
    font-size: 50px;
  }

  .landing-hero__desc {
    font-size: 12px;
  }

  .hero-slogans {
    padding: 12px 14px;
  }

  .hero-slogan__kanji {
    font-size: 30px;
  }

  .hero-slogan__romaji {
    font-size: 12px;
  }

  .hero-slogan__meaning {
    font-size: 11px;
  }

  .about-section__inner {
    grid-template-columns: 1fr;
  }

  .about-section__image {
    max-width: 100%;
  }

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

  .hero {
    min-height: 215px;
    padding: 29px 20px 42px;
    background-position: 54% center;
  }

  .hero::before {
    background: linear-gradient(90deg, rgba(13, 12, 12, .98), rgba(13, 12, 12, .82) 62%, rgba(13, 12, 12, .4)), linear-gradient(0deg, rgba(14, 12, 12, .52), transparent 55%);
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-content>p:not(.hero-kicker) {
    max-width: 315px;
    font-size: 10px;
  }

  .hero-motto {
    right: 15px;
    bottom: 12px;
    font-size: 12px;
  }

  .workspace {
    padding: 15px 13px 32px;
    display: block;
  }

  .sidebar {
    min-height: auto;
    margin-bottom: 20px;
    padding: 0;
  }

  .side-label {
    margin: 0 0 8px;
  }

  .category-nav {
    display: flex;
    overflow-x: auto;
    gap: 7px;
    padding-bottom: 4px;
  }

  .category-button {
    min-width: 150px;
    min-height: 46px;
  }

  .category-group {
    display: flex;
    gap: 7px;
    flex-shrink: 0;
  }

  .category-subnav {
    display: flex;
    gap: 7px;
    padding-left: 0;
    margin-left: 0;
    border-left: none;
  }

  .category-button,
  .category-subbutton {
    min-width: 150px;
    min-height: 46px;
  }

  .category-name {
    font-size: 13px;
  }

  .side-note {
    display: none;
  }

  .search-row {
    margin-bottom: 22px;
    align-items: stretch;
  }

  .search-box {
    flex: 1;
  }

  .add-button {
    padding: 0 10px;
    white-space: nowrap;
  }

  .document-grid {
    gap: 9px;
  }

  .document-card {
    min-height: 165px;
    padding: 10px;
  }

  .document-title {
    font-size: 16px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 5px;
  }

  .document-total {
    padding: 0;
  }

  .footer {
    padding-right: 14px;
    padding-left: 14px;
    font-size: 8px;
  }
}

@media (max-width: 430px) {
  .edition {
    max-width: 100px;
    font-size: 8px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .landing-hero__title {
    font-size: 40px;
  }

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

  .search-row {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
    flex: auto;
  }

  .add-button {
    align-self: flex-end;
    min-height: 35px;
  }

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

  .document-card {
    min-height: 151px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .material-dialog {
    padding: 20px 16px;
  }

  .footer {
    flex-wrap: wrap;
  }

  .footer span:last-child {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}