:root {
  --text: #25313b;
  --muted: #6f7d86;
  --line: rgba(44, 59, 69, 0.12);
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.88);
  --post-card-background: rgba(255, 255, 255, 0.72);
  --post-card-blur: 20px;
  --shadow: 0 20px 60px rgba(54, 68, 80, 0.14);
  --shadow-soft: 0 10px 30px rgba(54, 68, 80, 0.1);
  --accent: #7daea3;
  --accent-strong: #4f8d82;
  --accent-shadow: rgba(83, 143, 132, 0.24);
  --play-color: #d98f73;
  --play-strong: #bb745a;
  --play-shadow: rgba(217, 143, 115, 0.28);
  --danger: #cf6e75;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background: #f7efe8;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.background {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 214, 224, .9), transparent 32%),
    linear-gradient(135deg, #f8f0e7, #edf7f4);
  background-position: center;
  background-size: cover;
  transition: background 320ms ease;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  --header-scroll-progress: 0;
  --header-scroll-shift: 0px;
  --header-scroll-opacity: 1;
  opacity: var(--header-scroll-opacity);
  transform: translateY(calc(var(--header-scroll-shift) * -1));
  transition: transform 280ms cubic-bezier(0.22, 0.61, 0.36, 1), opacity 260ms ease-out;
}

.hero-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: clamp(128px, 22vw, 250px);
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.48);
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 236, 215, 0.82), transparent 28%),
    radial-gradient(circle at 78% 32%, rgba(187, 224, 255, 0.72), transparent 34%),
    linear-gradient(135deg, rgba(247, 222, 219, 0.94), rgba(220, 239, 234, 0.94));
  box-shadow: 0 16px 50px rgba(54, 68, 80, 0.1);
  pointer-events: none;
}

.header-links {
  position: absolute;
  top: 14px;
  right: clamp(16px, 4vw, 52px);
  z-index: 2;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: min(520px, calc(100% - 32px));
  pointer-events: auto;
}

.header-links a,
.footer-links a {
  color: rgba(37, 49, 59, 0.46);
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
  transition: color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.header-links a:hover,
.footer-links a:hover {
  color: rgba(37, 49, 59, 0.78);
  transform: translateY(-1px);
}

.site-logo-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.site-logo-text {
  font-size: clamp(42px, 9vw, 118px);
  font-weight: 800;
  letter-spacing: 0;
  color: rgba(37, 49, 59, 0.84);
  text-shadow: 0 12px 28px rgba(37, 49, 59, 0.12);
}

.nav-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  width: min(1120px, calc(100% - 32px));
  margin: -29px auto 0;
  padding: 0;
}

.play-button {
  min-width: min(340px, calc(100vw - 48px));
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 46px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, var(--play-color), var(--play-strong));
  box-shadow: 0 12px 26px var(--play-shadow);
  text-decoration: none;
  font-weight: 780;
  font-size: 18px;
  letter-spacing: 0;
  backdrop-filter: blur(18px);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.play-button:hover {
  transform: translateY(-2px);
  filter: saturate(1.05);
}

.tabs {
  width: min(560px, 100%);
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.tabs button,
.ghost-button,
.primary-small,
.round-add,
.editor-toolbar button,
.editor-toolbar select,
.text-button,
.primary-button,
.danger-button {
  border: 0;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.tabs button {
  min-height: 34px;
  padding: 0 15px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
}

.tabs button.is-active,
.ghost-button.is-active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 20px var(--accent-shadow);
}

.tabs button:hover,
.ghost-button:hover,
.primary-small:hover,
.round-add:hover,
.editor-toolbar button:hover,
.text-button:hover,
.primary-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.page-shell {
  width: min(1040px, calc(100% - 28px));
  margin: 0 auto;
  padding: clamp(292px, 34vw, 372px) 0 64px;
}

.feed {
  display: grid;
  gap: 28px;
}

.feed-card {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--post-card-background);
  backdrop-filter: blur(var(--post-card-blur));
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition: opacity 520ms ease, transform 520ms cubic-bezier(.16, 1, .3, 1);
}

.feed-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.post-image-frame,
.image-preview {
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
}

.post-image-frame img,
.image-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.post-title {
  margin: 0 0 14px;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: 0;
}

.post-body {
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.72;
}

.post-body > :first-child {
  margin-top: 0;
}

.post-body > :last-child {
  margin-bottom: 0;
}

.empty-state {
  width: min(680px, 100%);
  margin: 40px auto 0;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  backdrop-filter: blur(18px);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 18px;
  align-items: start;
}

.admin-login {
  width: min(420px, 100%);
  margin: 0 auto;
}

.login-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-strong);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow-soft);
}

.login-card strong {
  font-size: 22px;
}

.admin-toolbar {
  width: min(1040px, 100%);
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.admin-toolbar span {
  font-weight: 760;
}

.admin-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-strong);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow-soft);
}

.panel-head,
.editor-top,
.editor-actions,
.confirm-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head {
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 750;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  outline: none;
}

.field textarea {
  min-height: 86px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.rich-editor:focus {
  border-color: rgba(79, 141, 130, 0.5);
  box-shadow: 0 0 0 4px rgba(125, 174, 163, 0.16);
}

.field small {
  line-height: 1.45;
}

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

.layer-card {
  padding: 14px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.52);
}

.layer-card strong {
  display: block;
  margin-bottom: 10px;
}

.ghost-button,
.primary-small,
.primary-button,
.danger-button,
.text-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
}

.primary-small,
.primary-button,
.round-add {
  color: #fff;
  background: var(--accent-strong);
  box-shadow: 0 10px 24px rgba(79, 141, 130, 0.18);
}

.danger-button {
  color: #fff;
  background: var(--danger);
}

.text-button {
  min-height: 30px;
  padding: 0;
  color: var(--accent-strong);
  background: transparent;
  text-align: left;
}

.round-add {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
}

.admin-tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.admin-tab-row button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
}

.admin-tab-row button.is-active {
  color: #fff;
  background: var(--accent);
}

.post-editor {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.editor-toolbar button,
.editor-toolbar select {
  min-width: 38px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
}

.rich-editor {
  min-height: 210px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  outline: none;
  line-height: 1.7;
}

.post-list {
  display: grid;
  gap: 12px;
}

.admin-post {
  display: grid;
  grid-template-columns: 82px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.admin-post-thumb {
  width: 82px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(125, 174, 163, 0.14);
}

.admin-post-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.admin-post-title {
  font-weight: 720;
}

.admin-post-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.admin-post-actions {
  display: flex;
  gap: 8px;
}

.admin-post-actions button {
  min-height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(37, 49, 59, 0.18);
  backdrop-filter: blur(10px);
}

.confirm-card {
  width: min(360px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.confirm-card p {
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  max-width: min(360px, calc(100% - 44px));
  padding: 12px 16px;
  border-radius: 14px;
  color: #fff;
  background: rgba(37, 49, 59, 0.86);
  box-shadow: var(--shadow-soft);
}

.site-footer {
  width: min(1040px, calc(100% - 28px));
  margin: 0 auto;
  padding: 0 0 42px;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.copyright {
  color: rgba(37, 49, 59, 0.42);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .hero-banner {
    height: 150px;
  }

  .nav-panel {
    width: min(100% - 18px, 720px);
    margin-top: -27px;
    gap: 12px;
  }

  .play-button {
    min-width: min(300px, 100%);
    min-height: 54px;
  }

  .header-links {
    top: 10px;
    right: 12px;
    gap: 10px;
  }

  .page-shell {
    width: min(100% - 18px, 720px);
    padding-top: 276px;
  }

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

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

  .admin-post {
    grid-template-columns: 1fr;
  }

  .admin-post-thumb {
    width: 100%;
  }
}
