:root {
  --paper: #f6f4ee;
  --white: #fffefa;
  --ink: #25392f;
  --muted: #6d786f;
  --line: #dedfd5;
  --green: #315b47;
  --light: #e7eee5;
  --orange: #b9693a;
  --red: #a43e33;
  font-family:
    Inter, "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.6;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 7px;
  padding: 10px 16px;
  transition: background 0.16s;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
a {
  color: var(--green);
}
[hidden] {
  display: none !important;
}
.primary {
  background: var(--green);
  color: white;
  font-weight: 600;
}
.primary:hover {
  background: #254534;
}
.secondary {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}
.secondary:hover,
.quiet:hover {
  background: var(--light);
}
.quiet {
  color: var(--muted);
  background: transparent;
}
.danger {
  color: var(--red);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h2 {
  font-size: 28px;
  line-height: 1.4;
  letter-spacing: -0.04em;
  font-weight: 600;
}
label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
}
input,
select,
textarea {
  border: 1px solid #cbd1c7;
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  padding: 10px 12px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--green);
  border-color: transparent;
}
input {
  width: 100%;
}
.muted,
.help-text {
  color: var(--muted);
}
.help-text {
  font-size: 13px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 14px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.wordmark small {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  margin-left: 9px;
  color: var(--muted);
}
.brand-mark {
  display: inline-flex;
  border-radius: 50%;
  background: var(--green);
  color: white;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 27px;
  line-height: 1;
}
.local-note {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #648568;
}
.notice {
  background: #f2e8d5;
  border: 1px solid #e2d2ad;
  padding: 12px 15px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 20px;
  overflow-wrap: anywhere;
}
.notice.error {
  background: #fbebe5;
  color: #8b3e33;
  border-color: #e9cbc2;
}
.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-story {
  padding: 44px 64px;
  display: flex;
  flex-direction: column;
  background: #e8ebdf;
  border-right: 1px solid var(--line);
}
.story-content {
  margin: auto 0;
  padding: 70px 0;
}
.story-content h1 {
  font-size: clamp(44px, 5vw, 76px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.05em;
  margin: 0 0 36px;
}
.story-note {
  font-size: 16px;
  color: #657263;
}
.waveform {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 90px;
  margin: 30px 0 42px;
}
.waveform i {
  width: 4px;
  height: 28%;
  border-radius: 3px;
  background: #7d9273;
}
.waveform i:nth-child(3n) {
  height: 75%;
}
.waveform i:nth-child(4n) {
  height: 100%;
}
.waveform i:nth-child(5n) {
  height: 47%;
}
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}
.login-card {
  width: 100%;
  max-width: 340px;
}
.login-card h2 {
  font-size: 32px;
  margin-bottom: 10px;
}
.login-card form {
  margin-top: 35px;
}
.login-card input {
  margin-bottom: 22px;
  height: 48px;
}
.login-submit {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin: 8px 0 22px;
}
.login-card .help-text {
  font-size: 12px;
}
.topbar {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 36px;
  background: var(--white);
}
.topbar-end {
  display: flex;
  align-items: center;
  gap: 25px;
}
.workspace {
  max-width: 1600px;
  margin: auto;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: calc(100vh - 80px);
}
.library {
  padding: 32px 22px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.library-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.library h1 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}
.count {
  background: #e7e9df;
  color: var(--muted);
  padding: 0 7px;
  border-radius: 12px;
  font-size: 11px;
}
.library > .primary {
  width: 100%;
  margin-bottom: 32px;
}
.library-label {
  margin-left: 8px;
}
.library nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: calc(100vh - 300px);
  overflow-y: auto;
}
.library-pager {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 11px;
}
.job-item {
  background: transparent;
  text-align: left;
  padding: 13px 12px;
  color: var(--ink);
  width: 100%;
  border: 1px solid transparent;
}
.job-item:hover {
  background: #eceee5;
}
.job-item.active {
  background: var(--light);
  border-color: #cfdbcc;
}
.job-name {
  display: block;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}
.job-caption {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.library-footer {
  margin-top: auto;
  padding: 45px 8px 0;
  font-size: 11px;
  color: #7e877a;
}
.main-panel {
  padding: 48px 52px;
  min-width: 0;
}
.upload-panel {
  max-width: 750px;
  margin: 25px auto 0;
}
.upload-panel h2 {
  font-size: 30px;
  margin-bottom: 12px;
}
.dropzone {
  margin-top: 34px;
  min-height: 235px;
  border: 1px dashed #aebba8;
  background: var(--white);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-align: center;
  padding: 25px;
  cursor: pointer;
}
.dropzone:hover,
.dropzone:focus-within {
  background: #f0f4eb;
  border-color: var(--green);
}
.dropzone span:not(.upload-symbol) {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.upload-symbol {
  font-size: 36px;
  line-height: 1.3;
  margin-bottom: 7px;
  color: var(--green);
}
.dropzone strong {
  font-size: 16px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.dropzone input {
  width: auto;
  max-width: 100%;
  font-size: 12px;
  margin-top: 10px;
  border: 0;
  background: transparent;
  padding: 0;
}
.upload-options {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 22px 0 12px;
  gap: 20px;
}
.upload-options label {
  font-size: 12px;
}
.upload-options select {
  min-width: 220px;
}
.upload-options .primary {
  min-height: 46px;
  min-width: 145px;
}
.steps {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 48px;
  padding-top: 28px;
}
.steps > div {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}
.steps b {
  font-size: 11px;
  color: var(--orange);
  padding-top: 4px;
  font-weight: 500;
}
.steps span {
  font-size: 13px;
}
.steps small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.detail-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}
.detail-heading h2 {
  overflow-wrap: anywhere;
  margin-bottom: 10px;
  font-size: 25px;
}
.detail-heading .eyebrow {
  margin-bottom: 10px;
}
.record-meta {
  font-size: 12px;
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--light);
  border: 1px solid #cdd8c8;
  font-size: 12px;
  border-radius: 20px;
  white-space: nowrap;
  margin-top: 28px;
}
.audio-box {
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 16px 20px;
  background: #ebece3;
  border-radius: 8px;
  margin: 20px 0 25px;
}
.audio-label {
  font-size: 12px;
  white-space: nowrap;
}
audio {
  width: 100%;
  height: 36px;
}
.record-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 15px;
}
.tabs {
  display: flex;
  gap: 28px;
}
.tab {
  padding: 16px 0;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
}
.tab.selected {
  border-bottom-color: var(--green);
  color: var(--green);
  font-weight: 600;
}
.exports {
  display: flex;
  gap: 12px;
  font-size: 11px;
}
.exports a {
  text-decoration: none;
  cursor: pointer;
}
.exports a:not([href]) {
  opacity: 0.4;
  pointer-events: none;
}
.section-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 22px 0;
}
.section-toolbar p {
  margin: 0;
}
.section-toolbar button {
  font-size: 12px;
  white-space: nowrap;
}
.segment {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: start;
  gap: 15px;
  margin-bottom: 16px;
}
.time-link {
  background: transparent;
  padding: 10px 0;
  color: var(--green);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: left;
  white-space: nowrap;
}
.segment textarea {
  width: 100%;
  resize: vertical;
  line-height: 1.8;
  min-height: 65px;
  background: var(--white);
  border-color: transparent;
  padding: 8px 12px;
}
.segment textarea:hover {
  border-color: var(--line);
}
details {
  margin-top: 25px;
  font-size: 13px;
  color: var(--muted);
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}
#summary-content h3 {
  font-size: 16px;
  margin: 30px 0 15px;
}
#summary-content ul {
  padding-left: 20px;
}
#summary-content li {
  margin-bottom: 13px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.source-links {
  display: inline-flex;
  gap: 8px;
  margin-left: 8px;
  flex-wrap: wrap;
}
.source-links button {
  padding: 2px 5px;
  background: var(--light);
  color: var(--green);
  font-size: 11px;
}
.action-meta {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.record-actions {
  border-top: 1px solid var(--line);
  margin-top: 38px;
  padding-top: 18px;
  display: flex;
  gap: 10px;
}
.record-actions .danger {
  margin-left: auto;
}
.empty-content {
  padding: 40px 12px;
  color: var(--muted);
  font-size: 14px;
}
.local-note,
.job-caption,
.help-text {
  letter-spacing: 0.01em;
}
@media (max-width: 1050px) {
  .main-panel {
    padding: 36px 28px;
  }
  .workspace {
    grid-template-columns: 235px minmax(0, 1fr);
  }
  .library {
    padding: 28px 16px;
  }
  .job-name {
    max-width: 170px;
  }
  .login-story {
    padding: 38px;
  }
  .login-panel {
    padding: 35px;
  }
  .steps {
    gap: 10px;
  }
  .steps > div {
    gap: 8px;
  }
}
@media (max-width: 700px) {
  .topbar {
    padding: 0 18px;
    height: 66px;
  }
  .wordmark {
    font-size: 22px;
  }
  .wordmark small {
    display: none;
  }
  .topbar-end {
    gap: 10px;
  }
  .topbar-end .local-note {
    font-size: 10px;
  }
  .quiet {
    padding: 9px 10px;
  }
  .workspace {
    display: block;
    min-height: calc(100vh - 66px);
  }
  .library {
    padding: 20px 18px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .library-heading {
    margin-bottom: 12px;
  }
  .library > .primary {
    position: absolute;
    right: 18px;
    margin: 0;
    width: auto;
    font-size: 12px;
    padding: 8px 12px;
  }
  .library-label,
  .library-footer {
    display: none;
  }
  .library nav {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    gap: 8px;
    margin-top: 10px;
    padding-bottom: 5px;
  }
  .job-item {
    flex: 0 0 170px;
    padding: 10px;
  }
  .job-name {
    max-width: 145px;
    font-size: 12px;
  }
  .job-caption {
    font-size: 10px;
  }
  .main-panel {
    padding: 28px 18px 40px;
  }
  .upload-panel {
    margin-top: 8px;
  }
  .upload-panel h2 {
    font-size: 24px;
  }
  .upload-panel > .muted {
    font-size: 13px;
  }
  .dropzone {
    margin-top: 25px;
    min-height: 210px;
  }
  .upload-options {
    gap: 12px;
  }
  .upload-options select {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    font-size: 13px;
  }
  .upload-options > div {
    flex: 1;
    min-width: 0;
  }
  .upload-options .primary {
    font-size: 13px;
    min-width: 120px;
  }
  .steps {
    margin-top: 32px;
    padding-top: 22px;
    gap: 10px;
  }
  .steps > div {
    display: block;
  }
  .steps b {
    display: block;
    margin-bottom: 8px;
  }
  .steps span {
    font-size: 12px;
  }
  .steps small {
    font-size: 10px;
  }
  .detail-heading h2 {
    font-size: 22px;
  }
  .detail-heading {
    gap: 10px;
  }
  .badge {
    font-size: 10px;
    padding: 4px 8px;
  }
  .audio-box {
    padding: 12px;
    gap: 8px;
  }
  .audio-label {
    display: none;
  }
  .tabs {
    gap: 24px;
  }
  .exports {
    gap: 10px;
  }
  .section-toolbar {
    gap: 12px;
  }
  .section-toolbar .help-text {
    font-size: 11px;
  }
  .segment {
    grid-template-columns: 59px minmax(0, 1fr);
    gap: 5px;
  }
  .time-link {
    font-size: 10px;
  }
  .segment textarea {
    font-size: 14px;
    padding: 8px;
  }
  .login-layout {
    display: block;
  }
  .login-story {
    padding: 23px 25px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .story-content {
    padding: 25px 0 0;
  }
  .story-content .eyebrow {
    margin-bottom: 8px;
  }
  .story-content h1 {
    font-size: 36px;
    margin-bottom: 10px;
  }
  .story-content h1 br {
    display: none;
  }
  .waveform,
  .story-note,
  .login-story > .local-note {
    display: none;
  }
  .login-panel {
    padding: 30px 25px 40px;
  }
  .login-card {
    max-width: 400px;
  }
  .login-card h2 {
    font-size: 26px;
  }
  .login-card form {
    margin-top: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
