:root {
  color-scheme: light;
  --site-header-height: 52px;
  font-family: "Futura", "Avenir Next", "Segoe UI", "Helvetica Neue", Helvetica, sans-serif;
  background-color: #f7f7f5;
  color: #1b1f26;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f7f7f5;
  overflow-y: scroll; /* Force scrollbar */
  scrollbar-gutter: stable;
}

/* Claude-inspired homepage palette */
.home-body {
  background: #eeece2;
  color: #3d3929;
  font-family: "Lora", Georgia, "Times New Roman", serif;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

/* 顶栏样式见文件末尾「全站顶栏」区块，勿在 body 子类中单独覆盖 */

/* Homepage content blocks */
.home-main {
  flex: 1;
  max-width: 1200px;
  width: calc(100% - 3rem);
  margin: 2.75rem auto 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.home-hero {
  background: #ffffff;
  border-radius: 16px;
  padding: clamp(2.4rem, 5vw, 3.6rem);
  border: 1px solid #e8e6dc;
  box-shadow: 0 4px 24px rgba(20, 20, 19, 0.06);
  color: #3d3929;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.home-label {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #b0aea5;
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-weight: 500;
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.9rem);
  color: #141413;
  letter-spacing: -0.02em;
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-weight: 600;
  line-height: 1.25;
}

.home-subtitle {
  margin: 0;
  max-width: 48rem;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #3d3929;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.8rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-family: "Poppins", "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.home-button.primary {
  background: #141413;
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(20, 20, 19, 0.2);
}

.home-button.primary:hover {
  background: #2a2826;
}

.home-button.secondary {
  background: #ffffff;
  color: #3d3929;
  border: 1px solid #b0aea5;
}

.home-button.secondary:hover {
  border-color: #d97757;
  color: #d97757;
}

.home-button:hover {
  transform: translateY(-1px);
}

.home-intro {
  background: #ffffff;
  border-radius: 16px;
  padding: 0;
  border: 1px solid #e8e6dc;
  box-shadow: 0 4px 24px rgba(20, 20, 19, 0.06);
  color: #3d3929;
  overflow: hidden;
}
.home-intro-label {
  margin: 0;
  padding: 1rem 1.5rem 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #b0aea5;
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-weight: 500;
  border-bottom: 1px solid #f0eee8;
}
.home-intro-body {
  padding: 1.5rem clamp(1.5rem, 4vw, 2.5rem) clamp(1.75rem, 4vw, 2.5rem);
  border-left: 3px solid #d97757;
  margin-left: 0;
  background: linear-gradient(to right, rgba(217, 119, 87, 0.04) 0%, transparent 12%);
}
.home-intro-body p {
  margin: 0 0 1.25rem 0;
  line-height: 1.85;
  font-size: 0.98rem;
  color: #3d3929;
}
.home-intro-body p:last-child {
  margin-bottom: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* 内容页（关于、隐私、使用指南） */
.content-page {
  gap: 2rem;
}
.content-article {
  background: #ffffff;
  border-radius: 16px;
  padding: clamp(2rem, 4vw, 3rem);
  border: 1px solid #e8e6dc;
  box-shadow: 0 4px 24px rgba(20, 20, 19, 0.06);
  color: #3d3929;
  max-width: 720px;
  margin: 0 auto;
}
.content-article h1 {
  margin: 0 0 1rem 0;
  font-size: 1.75rem;
  color: #141413;
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-weight: 600;
}
.content-article h2 {
  margin: 2rem 0 0.75rem 0;
  font-size: 1.2rem;
  color: #141413;
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-weight: 600;
}
.content-article h3 {
  margin: 1.25rem 0 0.5rem 0;
  font-size: 1rem;
  color: #3d3929;
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-weight: 600;
}
.content-article p {
  margin: 0 0 1rem 0;
  line-height: 1.8;
  font-size: 0.98rem;
}
.content-article .content-lead {
  font-size: 1.05rem;
  color: #4a4638;
  margin-bottom: 1.5rem;
}
.content-article .content-meta {
  margin-top: 2rem;
  font-size: 0.88rem;
  color: #8c8a82;
}
.content-article a {
  color: #d97757;
  text-decoration: none;
}
.content-article a:hover {
  text-decoration: underline;
}
.content-article code {
  background: #f2f0eb;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}
.footer-link {
  color: #b0aea5;
  text-decoration: none;
}
.footer-link:hover {
  color: #3d3929;
  text-decoration: underline;
}

.feature-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.75rem;
  border: 1px solid #e8e6dc;
  box-shadow: 0 2px 16px rgba(20, 20, 19, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: #3d3929;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  border-color: #b0aea5;
  box-shadow: 0 4px 24px rgba(20, 20, 19, 0.08);
}

.feature-card.placeholder {
  border-style: dashed;
  background: #f8f7f4;
}

.feature-card h2 {
  margin: 0;
  font-size: 1.15rem;
  color: #141413;
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feature-card p {
  margin: 0;
  color: #3d3929;
  line-height: 1.65;
  font-size: 0.95rem;
}

.feature-link {
  margin-top: auto;
  font-weight: 600;
  color: #6a9bcc;
  text-decoration: none;
  font-family: "Poppins", "Segoe UI", sans-serif;
  transition: color 0.2s ease;
}

.feature-link:hover {
  color: #d97757;
}

.feature-link.disabled {
  color: #b0aea5;
  cursor: default;
}

.home-signature {
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: #b0aea5;
  font-size: 0.9rem;
}

.signature-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #b0aea5;
  font-family: "Poppins", "Segoe UI", sans-serif;
}

.home-signature p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #3d3929;
}

.home-signature .feature-link {
  color: #6a9bcc;
  font-size: 0.9rem;
}

.home-signature .feature-link:hover {
  color: #d97757;
}

.home-body .app-footer {
  background: transparent;
  color: #b0aea5;
  text-align: left;
  font-size: 0.9rem;
}
.home-body .app-footer div {
  text-align: center !important;
  width: 100%;
  padding-left: 0;
}

/* 留言板（紧凑版） */
.home-guestbook {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  border: 1px solid #e8e6dc;
  box-shadow: 0 2px 16px rgba(20, 20, 19, 0.05);
  max-width: 480px;
  width: 100%;
  box-sizing: border-box;
}
.guestbook-title {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  color: #141413;
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-weight: 600;
}
.guestbook-hint {
  margin: 0 0 0.75rem 0;
  font-size: 0.85rem;
  color: #3d3929;
  line-height: 1.5;
}
.guestbook-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  box-sizing: border-box;
}
.guestbook-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
  box-sizing: border-box;
}
.guestbook-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #141413;
  font-family: "Poppins", "Segoe UI", sans-serif;
}
.guestbook-field input,
.guestbook-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.65rem;
  border: 1px solid #b0aea5;
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: inherit;
  background: #fafaf8;
  color: #3d3929;
}
.guestbook-field input:focus,
.guestbook-field textarea:focus {
  outline: none;
  border-color: #6a9bcc;
}
.guestbook-field textarea {
  resize: vertical;
  min-height: 60px;
}
.guestbook-form .home-button {
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  margin-top: 0.25rem;
  align-self: flex-start;
}
.guestbook-actions {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.guestbook-stats {
  font-size: 0.82rem;
  color: #6b7280;
}
.guestbook-download-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #b0aea5;
  border-radius: 6px;
  background: #fafaf8;
  color: #3d3929;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
.guestbook-download-btn:hover {
  border-color: #d97757;
  color: #d97757;
}
.guestbook-msg {
  margin: 0.35rem 0 0 0;
  font-size: 0.82rem;
}
.guestbook-msg.success {
  color: #2f9c61;
}
.guestbook-msg.error {
  color: #d9534f;
}
.footer-sep {
  margin: 0 0.75rem;
  opacity: 0.6;
}
.footer-version {
  opacity: 0.7;
  font-size: 0.85rem;
}

/* Shared light workspace styling (Excel / others) */
.workspace-body {
  background: #f6f6f8;
  color: #1e222c;
  font-family: "Inter", "Avenir Next", "Segoe UI", "Helvetica Neue", Helvetica, sans-serif;
  overflow-y: scroll; /* Force scrollbar */
  scrollbar-gutter: stable;
}

/* Claude-inspired Excel page */
.workspace-body.excel-page {
  background: #eeece2;
  color: #3d3929;
  font-family: "Lora", Georgia, "Times New Roman", serif;
}

.workspace-body.excel-page .workspace-sidebar,
.workspace-body.excel-page .upload-panel,
.workspace-body.excel-page .preview-section,
.workspace-body.excel-page .export-section,
.workspace-body.excel-page .voice-map-section {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e8e6dc;
  box-shadow: 0 2px 16px rgba(20, 20, 19, 0.05);
}

.workspace-body.excel-page .workspace-sidebar h2,
.workspace-body.excel-page .upload-instruction h2,
.workspace-body.excel-page .preview-header h2,
.workspace-body.excel-page .export-hint h2,
.workspace-body.excel-page .voice-map-header h2 {
  color: #141413;
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-weight: 600;
}

.workspace-body.excel-page .workspace-sidebar h3 {
  color: #3d3929;
  font-family: "Poppins", "Segoe UI", sans-serif;
}

.workspace-body.excel-page .workspace-sidebar p,
.workspace-body.excel-page .upload-instruction p,
.workspace-body.excel-page .preview-header p,
.workspace-body.excel-page .export-hint p,
.workspace-body.excel-page .voice-map-header p {
  color: #3d3929;
}

.workspace-body.excel-page .workspace-sidebar code {
  background: #e8e6dc;
  color: #141413;
}

.workspace-body.excel-page .upload-control {
  background: #ffffff;
  border-color: #b0aea5;
  color: #3d3929;
}

.workspace-body.excel-page .upload-control:hover {
  border-color: #d97757;
}

.workspace-body.excel-page .primary {
  background: #141413;
  color: #ffffff;
}

.workspace-body.excel-page .secondary {
  background: #ffffff;
  color: #3d3929;
  border: 1px solid #b0aea5;
}

.workspace-body.excel-page .secondary:hover {
  border-color: #d97757;
  color: #d97757;
}

.workspace-body.excel-page .upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* Claude 风格：统一 tools 子页面（tts / noiz / feedback） */
.workspace-body.tools-page {
  background: #eeece2;
  color: #3d3929;
  font-family: "Lora", Georgia, "Times New Roman", serif;
}

.workspace-body.tools-page .section-card,
.workspace-body.tools-page .card,
.workspace-body.tools-page .voice-panel,
.workspace-body.tools-page .voice-overlay .voice-panel,
.workspace-body.tools-page .upload-panel,
.workspace-body.tools-page .voice-map-section,
.workspace-body.tools-page .batch-card,
.workspace-body.tools-page .segment-card {
  background: #ffffff !important;
  border: 1px solid #e8e6dc !important;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(20, 20, 19, 0.05);
}

.workspace-body.tools-page .section-title,
.workspace-body.tools-page h1,
.workspace-body.tools-page h2 {
  color: #141413 !important;
  font-family: "Poppins", "Segoe UI", sans-serif !important;
}

.workspace-body.tools-page .hint,
.workspace-body.tools-page p,
.workspace-body.tools-page label {
  color: #3d3929 !important;
}

.workspace-body.tools-page input,
.workspace-body.tools-page textarea,
.workspace-body.tools-page select {
  background: #fafaf8 !important;
  border-color: #b0aea5 !important;
  color: #3d3929 !important;
}

.workspace-body.tools-page .primary,
.workspace-body.tools-page .btn-primary,
.workspace-body.tools-page .upload-btn,
.workspace-body.tools-page .add-row-btn {
  background: #141413 !important;
  color: #ffffff !important;
}

.workspace-body.tools-page .secondary,
.workspace-body.tools-page .btn-secondary {
  background: #ffffff !important;
  color: #3d3929 !important;
  border: 1px solid #b0aea5 !important;
}

.workspace-body.tools-page .secondary:hover,
.workspace-body.tools-page .btn-secondary:hover {
  border-color: #d97757 !important;
  color: #d97757 !important;
}

.workspace-body main {
  width: min(1140px, calc(100% - 3rem));
  margin: 3.2rem auto 3.5rem;
  padding-bottom: 3rem;
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 2rem;
}

.workspace-body .upload-panel,
.workspace-body .preview-section,
.workspace-body .export-section,
.workspace-body .voice-map-section {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #e6e6e1;
  box-shadow: 0 12px 28px rgba(21, 24, 31, 0.08);
  backdrop-filter: none;
  padding: clamp(1.6rem, 4vw, 2.1rem);
}

.workspace-body .upload-instruction h2,
.workspace-body .preview-header h2,
.workspace-body .export-hint h2,
.workspace-body .voice-map-header h2 {
  color: #1f232d;
  letter-spacing: 0.08em;
}

.workspace-body .upload-instruction p,
.workspace-body .preview-header p,
.workspace-body .export-hint p,
.workspace-body .voice-map-header p {
  color: #666a72;
}

.workspace-sidebar {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #e6e6e1;
  box-shadow: 0 12px 28px rgba(21, 24, 31, 0.08);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  height: fit-content;
  position: sticky;
  top: calc(var(--site-header-height) + 1rem);
}

.workspace-sidebar h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1f2734;
}

.workspace-sidebar p {
  margin: 0;
  color: #5b616d;
  line-height: 1.7;
}

.workspace-sidebar code {
  background: #f6f6f5;
  color: #1c1f26;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  font-size: 0.95em;
}

.workspace-content {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

@media (max-width: 1024px) {
  .workspace-body main {
    grid-template-columns: 1fr;
  }
  .workspace-sidebar {
    position: static;
    order: -1;
  }
}

.workspace-body .upload-control {
  background: #ffffff;
  color: #1b1f26;
  border: 1px solid #e0e0dc;
  box-shadow: none;
}

.workspace-body .file-meta {
  color: #6f737a;
}

/* 统一 workspace-body 页面的输入框背景色和高度 */
.workspace-body input[type="text"],
.workspace-body input[type="password"],
.workspace-body input[type="number"],
.workspace-body textarea,
.workspace-body select,
.workspace-body .voice-map-input {
  background: #fafaf8 !important;
  color: #1c1f26 !important;
  border: 1px solid #e0e0dc;
  height: 42px !important;
  line-height: 22px !important;
  font-size: 14px !important;
  box-sizing: border-box !important;
  padding: 10px 12px !important;
}

.workspace-body textarea {
  height: auto !important;
  min-height: 72px !important;
}

/* 确保select元素在所有浏览器中都有一致的高度和外观 */
.workspace-body select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  cursor: pointer !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231e222c' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  padding-right: 36px !important;
}

.workspace-body input[type="text"]:focus,
.workspace-body input[type="password"]:focus,
.workspace-body input[type="number"]:focus,
.workspace-body textarea:focus,
.workspace-body select:focus,
.workspace-body .voice-map-input:focus {
  background: #f5f5f2 !important;
  color: #1c1f26 !important;
  border-color: #b4b6b0;
  box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.08);
}

.workspace-body .table-wrapper {
  background: #ffffff;
  border: 1px solid #e6e6e1;
  box-shadow: none;
}

.workspace-body table {
  color: #1e222c;
}

.workspace-body thead th {
  background: #f7f7f5;
  color: #1c1f26;
  border-bottom: 1px solid #e6e6e1;
}

.workspace-body tbody tr:nth-child(odd) {
  background: #fbfbfa;
}

.workspace-body th,
.workspace-body td {
  border-bottom: 1px solid #e6e6e1;
}

.workspace-body button.primary {
  background: #111111;
  color: #ffffff;
  box-shadow: none;
}

.workspace-body button.secondary {
  background: #ffffff;
  color: #1c1f26;
  border: 1px solid #e0e0dc;
}

.workspace-body button.secondary:hover {
  background: #f2f2ef;
}

.workspace-body .app-footer {
  color: #6a6d73;
  text-align: left;
}

/* ========== 全站顶栏（唯一规范：切换页面时尺寸/对齐不变） ========== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  flex: 0 0 auto;
  min-height: var(--site-header-height);
  box-sizing: border-box;
  background: #ffffff;
  border-bottom: 1px solid #e8e6dc;
  box-shadow: 0 1px 0 rgba(20, 20, 19, 0.06);
}

.nav-inner {
  max-width: 1200px;
  width: calc(100% - 3rem);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  min-height: calc(var(--site-header-height) - 1px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  box-sizing: border-box;
  min-width: 0;
}

.nav-logo {
  flex: 0 0 auto;
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #141413;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 0.25rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.nav-link {
  flex: 0 0 auto;
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  color: #3d3929;
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-link:hover {
  color: #141413;
  background: #e8e6dc;
}

.nav-link.active {
  color: #141413;
  background: #e8e6dc;
  font-weight: 600;
}

.nav-placeholder {
  flex: 0 0 auto;
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-size: 0.8125rem;
  color: #b0aea5;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .nav-inner {
    width: calc(100% - 1.5rem);
    padding: 0.65rem 0.75rem;
    gap: 0.5rem;
  }

  .nav-logo {
    font-size: 0.8125rem;
  }

  .nav-link,
  .nav-placeholder {
    font-size: 0.75rem;
    padding: 0.3rem 0.4rem;
  }
}

.app-header {
  position: relative;
  padding: clamp(2rem, 6vw, 3.5rem) clamp(1.5rem, 5vw, 4rem);
  color: #f8fafc;
  background: #111111;
  border-bottom: 1px solid #e6e6e1;
  overflow: hidden;
}

.app-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(55% 60% at 80% -10%, rgba(255, 255, 255, 0.08) 0%, transparent 65%),
    radial-gradient(50% 55% at -10% 70%, rgba(255, 255, 255, 0.06) 0%, transparent 75%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08) 1px, transparent 1px, transparent 20px);
  mix-blend-mode: screen;
  pointer-events: none;
}

.app-header h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-header p {
  margin: 0;
  max-width: 56rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(226, 232, 240, 0.85);
}

.signature {
  margin-top: 0.75rem;
  padding: 0.4rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.5);
  border-radius: 999px;
  background: linear-gradient(
    120deg,
    rgba(251, 191, 36, 0.15),
    rgba(251, 191, 36, 0.05),
    rgba(251, 191, 36, 0.18)
  );
  box-shadow: 0 10px 30px rgba(251, 191, 36, 0.18);
}

.signature::before,
.signature::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

main {
  flex: 1;
  width: min(1140px, calc(100% - 2.5rem));
  margin: -2.5rem auto 3rem;
  padding-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.upload-panel,
.preview-section,
.export-section,
.voice-map-section {
  overflow: hidden;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e6e6e1;
  box-shadow: 0 12px 28px rgba(21, 24, 31, 0.08);
  backdrop-filter: none;
  padding: clamp(1.5rem, 4vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.upload-panel {
  align-items: flex-start;
}

.upload-instruction h2,
.preview-header h2,
.export-hint h2,
.voice-map-header h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1b1f26;
}

.upload-instruction p,
.preview-header p,
.export-hint p,
.voice-map-header p {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #666a72;
}

.upload-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.8rem;
  border-radius: 999px;
  cursor: pointer;
  background: #ffffff;
  color: #1b1f26;
  border: 1px solid #e0e0dc;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.upload-control:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.upload-control input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-meta {
  min-height: 1.5rem;
  font-size: 0.9rem;
  color: #6f737a;
}

.preview-section {
  gap: 1.5rem;
}

.voice-map-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.voice-map-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1.6fr) auto minmax(0, 2fr);
  align-items: center;
  gap: 0.6rem 0.75rem;
  padding: 0.95rem 1.2rem;
  border-radius: 16px;
  background: #fbfbfa;
  border: 1px solid #e6e6e1;
}

.voice-map-label {
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #1b1f26;
}

.voice-map-role {
  color: #2f343d;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-map-equals {
  color: #9ea1a5;
  font-weight: 600;
}

.voice-map-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(170, 183, 214, 0.9);
  background: #ffffff;
  color: #1f2a44;
  font-size: 0.95rem;
}

.voice-map-input:focus {
  outline: none;
  border-color: #b4b6b0;
  box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.08);
}

.preview-table {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.preview-table .table-wrapper {
  background: transparent;
}

.table-wrapper {
  overflow-x: auto;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e6e6e1;
  box-shadow: none;
  backdrop-filter: none;
  padding: 1.4rem;
}

button {
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.4rem;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

button.primary {
  background: #111111;
  color: #ffffff;
  box-shadow: none;
}

button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

button.secondary {
  background: #ffffff;
  color: #1c1f26;
  border: 1px solid #e0e0dc;
}

button.secondary:hover {
  background: #f2f2ef;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
  color: #1b1f26;
}

th,
td {
  padding: 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  vertical-align: top;
}

thead th {
  background: #f7f7f5;
  color: #1b1f26;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.col-index {
  width: 48px;
  text-align: center;
  color: rgba(226, 232, 240, 0.75);
}

.col-voice-id {
  width: 180px;
}

.col-content {
  width: 360px;
}

.col-preview {
  width: 280px;
}

.col-actions {
  width: 90px;
  text-align: center;
}

input[type="text"],
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fafaf8;
  color: #1b1f26;
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 46px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input[type="text"]::placeholder,
textarea::placeholder {
  color: #9ea1a5;
}

input[type="text"]:focus,
textarea:focus {
  border-color: #b4b6b0;
  background: #f5f5f2;
  outline: none;
  box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.08);
}

.preview-cell {
  font-size: 0.85rem;
  line-height: 1.7;
  color: #2f343d;
}

.preview-block strong {
  color: #1b1f26;
}

.preview-block ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.preview-block li {
  margin-bottom: 0.35rem;
}

.preview-block li:last-child {
  margin-bottom: 0;
}

.delete-btn {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.delete-btn:hover {
  background: rgba(248, 113, 113, 0.28);
}

.export-hint {
  max-width: 580px;
}

.export-hint h2 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1b1f26;
}

.export-hint p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #666a72;
}

.export-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.app-footer {
  text-align: center;
  padding: 1.5rem 0 3rem;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: #6a6d73;
}

.ad-container {
  width: 100%;
  max-width: 1200px;
  margin: 1.25rem auto;
  padding: 0.75rem;
  border: 1px dashed #d8d8d2;
  border-radius: 12px;
  background: #fcfcfa;
  min-height: 108px;
  text-align: center;
}

.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  color: #8c8f94;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.ad-container-home {
  max-width: 1100px;
}

.ad-container-sidebar {
  margin-top: 1.4rem;
  min-height: 280px;
}

.ad-container-tts,
.ad-container-feedback {
  max-width: 1200px;
  margin: 0 auto 1.2rem;
}

.ad-container-footer-gap {
  margin-bottom: 0.35rem;
}

@media (max-width: 900px) {
  main {
    width: min(100%, calc(100% - 1.5rem));
    margin-top: -1.5rem;
  }

  table {
    min-width: 100%;
  }

  textarea {
    min-height: 72px;
  }

  .ad-container {
    min-height: 84px;
    margin: 0.85rem auto;
    padding: 0.6rem;
  }

  .ad-placeholder {
    min-height: 68px;
    font-size: 0.8rem;
  }

  .ad-container-sidebar {
    min-height: 220px;
  }
}
