:root {
  color-scheme: light;
  font-family: "Inter", "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  color: #27231f;
  background: #f9f7f2;
  line-height: 1.5;
  --ink: #27231f;
  --muted: #625c54;
  --accent: #784c43;
  --accent-dark: #623a34;
  --line: #e6ddd5;
  --paper: #fffdfa;
  --wash: #f8eee8;
  --serif: "Noto Serif KR", "Batang", "AppleMyungjo", Georgia, serif;
  --shadow: 0 18px 50px #3e393512, 0 2px 6px #3e39350a;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
button:disabled { opacity: .57; cursor: not-allowed; }
button, .download-link {
  min-height: 41px;
  padding: .48rem .84rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fffdfa;
  font-weight: 700;
}
button:hover:not(:disabled), .download-link:hover { background: var(--wash); }
a { color: var(--accent-dark); }
:focus-visible { outline: 3px solid #995d52; outline-offset: 3px; }
[hidden] { display: none !important; }
[data-native] #recording-tools, [data-native] .workspace-nav [href="#recording-tools"],
[data-native] #logout { display: none !important; }
p:empty { display: none; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { word-break: keep-all; overflow-wrap: anywhere; }

.brand { display: flex; align-items: center; gap: .58rem; font-size: .94rem; font-weight: 800; letter-spacing: -.045em; }
.brand-mark {
  display: flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  gap: 2.7px;
  width: 34px;
  height: 34px;
  border: 1px solid #a77e72;
  border-radius: 50%;
  color: var(--accent-dark);
}
.brand-mark i { width: 2px; height: 9px; border-radius: 2px; background: currentColor; }
.brand-mark i:nth-child(2) { height: 15px; }
.brand-mark i:nth-child(3) { height: 12px; }
.brand-mark i:nth-child(4) { height: 6px; }
.gradient-surface {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #ece1d8;
  border-radius: 25px;
  background:
    radial-gradient(ellipse at 99% 0%, #f2cfcc 14%, transparent 47%),
    radial-gradient(ellipse at 96% 98%, #d7eaf7 17%, transparent 51%),
    radial-gradient(ellipse at 56% 96%, #fbefb0 9%, transparent 38%),
    radial-gradient(ellipse at 3% 50%, #eaf4fb 5%, transparent 29%),
    #fdfaf6;
  box-shadow: var(--shadow);
}
.gradient-surface::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(#66483b32 .42px, transparent .55px);
  background-size: 3px 3px;
  mask-image: linear-gradient(90deg, #000, transparent 32%, transparent 58%, #000);
  opacity: .35;
  content: "";
}
.photo-frame {
  position: relative;
  align-self: center;
  isolation: isolate;
  width: 100%;
  padding: 13px;
  border: 1px solid #fff;
  border-radius: 22px;
  background: #fffefc;
  box-shadow: 0 14px 34px #62453a2e, 0 2px 7px #6e4b3d16;
}
.photo-frame::before {
  position: absolute;
  z-index: -1;
  right: -9%;
  bottom: -13%;
  width: 70%;
  aspect-ratio: 1;
  border: 1px solid #ad8b7d78;
  border-radius: 50%;
  content: "";
}
.photo-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  object-fit: cover;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(17rem, .85fr) minmax(16rem, 1fr);
  align-items: center;
  gap: clamp(2.8rem, 8vw, 7rem);
  width: min(68rem, calc(100% - 3rem));
  min-height: 35rem;
  margin: clamp(1.5rem, 8vh, 5.5rem) auto;
  padding: clamp(2.1rem, 6vw, 5.4rem);
}
.auth-panel { width: 100%; min-width: 0; }
.auth-panel .brand { margin-bottom: 1.55rem; }
.auth-panel h1, .recording-heading h2 {
  font-family: var(--serif);
  font-weight: 650;
  line-height: 1.13;
  letter-spacing: -.057em;
}
.auth-panel h1 { margin-bottom: 1.45rem; font-size: clamp(2.4rem, 5vw, 4rem); }
#auth-form { display: grid; gap: .94rem; }
.field { display: grid; gap: .33rem; }
.field label { font-size: .82rem; font-weight: 800; }
.field-note, .feedback { color: var(--muted); font-size: .82rem; }
.field input {
  min-width: 0;
  width: 100%;
  height: 46px;
  padding: .6rem .76rem;
  border: 1px solid #dcd1c6;
  border-radius: 9px;
  background: #fffdfb;
}
.email-field { display: flex; align-items: center; }
.email-field input { flex: 1; border-radius: 9px 0 0 9px; }
.email-field span {
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0 .58rem;
  border: 1px solid #dcd1c6;
  border-left: 0;
  border-radius: 0 9px 9px 0;
  background: #f4eee8;
  color: #514234;
  font-size: .74rem;
  font-weight: 700;
}
.primary, #start {
  min-height: 46px;
  border-color: var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}
.primary:hover:not(:disabled), #start:hover:not(:disabled) { background: var(--accent-dark); }
.auth-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .45rem; padding-top: .6rem; }
.button-text { border: 0; background: transparent; color: var(--accent-dark); }
#login-message, #workspace-message { margin-top: .75rem; }
.session-error {
  display: flex;
  align-items: center;
  gap: .8rem;
  width: fit-content;
  margin: 3rem auto;
  color: var(--muted);
}

.workspace { min-height: 100dvh; }
.native-title { display: none; }
.workspace-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: .7rem;
  width: min(79rem, calc(100% - 3rem));
  min-height: 75px;
  margin-inline: auto;
  border-bottom: 1px solid var(--line);
}
.workspace-nav, .account-actions { display: flex; align-items: center; gap: .54rem; }
.workspace-nav { gap: clamp(.8rem, 3vw, 2rem); }
.workspace-nav a {
  padding: .48rem .42rem;
  border-radius: 7px;
  color: #443a32;
  font-size: .9rem;
  font-weight: 750;
  text-decoration: none;
}
.workspace-nav a:hover { background: #efe6dc; color: var(--accent-dark); }
.account-actions { justify-content: flex-end; }
.roster { position: relative; font-size: .84rem; }
.roster summary { padding: .38rem .3rem; font-weight: 700; white-space: nowrap; }
.roster ul {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 2;
  width: max-content;
  max-width: 18rem;
  min-width: 9.5rem;
  margin: .35rem 0 0;
  padding: .7rem .8rem .7rem 1.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
}
#logout { min-height: 37px; padding: .42rem .63rem; font-size: .82rem; white-space: nowrap; }
.workspace-body { width: min(73rem, calc(100% - 3rem)); margin-inline: auto; padding: 1.35rem 0 3rem; }
.workspace-context {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .42rem 1rem;
  margin-bottom: .8rem;
}
#staff { font-size: 1rem; letter-spacing: -.035em; }
.workspace-grid { display: grid; gap: 1.5rem; }

#recording-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, .91fr);
  align-items: center;
  gap: clamp(2.5rem, 8vw, 7.6rem);
  padding: clamp(1.6rem, 4.2vw, 3.8rem) clamp(2rem, 6.2vw, 5.8rem);
}
.recording-controls { min-width: 0; }
#recorder { display: flex; flex-direction: column; min-width: 0; }
.recording-heading { display: flex; order: -1; align-items: center; gap: .8rem; }
.recording-heading h2 { font-size: clamp(2.4rem, 5.7vw, 4.5rem); }
.recording-heading::after {
  width: .46rem;
  height: .46rem;
  border-radius: 50%;
  background: #a17b6e;
  box-shadow: 0 0 0 4px #efe0d8;
  content: "";
}
#recorder:has(#stop:not([hidden])) .recording-heading::after {
  background: #ac2e43;
  box-shadow: 0 0 0 4px #f9dce1;
}
#timer {
  margin: .65rem 0 .65rem;
  color: #40342a;
  font-size: clamp(1.65rem, 3.8vw, 2.6rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.045em;
  line-height: 1.15;
}
#start, #stop { order: 1; align-self: flex-start; min-width: 9.6rem; min-height: 43px; color: #fff; }
#stop { border-radius: 999px; border-color: #a32f42; background: #a32f42; }
#stop:hover:not(:disabled) { background: #832435; }
#mic-active { order: 2; margin-top: .46rem; }
#recorder > .hint:last-child { display: none; order: 3; margin-top: .42rem; }
#recorder:has(#stop:not([hidden])) > .hint:last-child { display: block; }
.mic-controls {
  display: grid;
  order: 4;
  gap: .39rem;
  max-width: 28rem;
  margin-top: 1.22rem;
  padding-top: .78rem;
  border-top: 1px solid #dfd4c9;
}
.mic-controls label { font-size: .83rem; font-weight: 800; }
.mic-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .38rem; }
.mic-controls button { min-height: 38px; padding: .36rem .54rem; font-size: .79rem; }
.mic-controls select {
  min-width: 0;
  min-height: 38px;
  padding: .3rem .48rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fffdfa;
  font-size: .81rem;
}
#mic-test { justify-self: start; }
#mic-level { display: block; width: 100%; }
#recording-tools .hint, #recording-tools #status { color: var(--muted); font-size: .79rem; overflow-wrap: anywhere; }
#recording-tools #status { margin: .6rem 0 0; }
#pending { margin-top: .6rem; }
#pending h2 { font-size: .88rem; }
#pending ul { margin: .3rem 0 0; padding: 0; list-style: none; }
#pending li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .35rem; font-size: .82rem; }

#library {
  min-width: 0;
  padding: clamp(1rem, 2.7vw, 1.85rem) clamp(1rem, 3.25vw, 2.3rem);
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.section-heading, .detail-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .54rem;
}
.section-heading { margin-bottom: .85rem; }
.section-heading h2 { font-family: var(--serif); font-size: clamp(1.35rem, 3.3vw, 2rem); letter-spacing: -.055em; }
#refresh-meetings { min-height: 36px; font-size: .79rem; }
.meetings { display: grid; gap: .42rem; }
.meeting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem;
  width: 100%;
  padding: .71rem .8rem;
  text-align: left;
  font-weight: 500;
}
.meeting-row[aria-current="true"] { border-color: #cfaea2; background: #f9eee8; }
.meeting-row strong { min-width: 0; overflow-wrap: anywhere; font-size: .9rem; }
.meeting-row time, .stage { display: block; color: var(--muted); font-size: .75rem; }
.stage { padding: .15rem .42rem; border-radius: 7px; background: #f1ebe4; font-weight: 750; white-space: nowrap; }
.stage[data-stage="ready"] { background: #eaf0e6; color: #385c39; }
.empty-state { padding: 1rem .76rem; border: 1px dashed var(--line); border-radius: 9px; color: var(--muted); font-size: .86rem; text-align: center; }
.meeting-detail { margin-top: 1.13rem; padding-top: 1.09rem; border-top: 1px solid var(--line); }
.meeting-detail h3 { margin-bottom: .66rem; font-size: 1rem; letter-spacing: -.035em; }
.view-tabs { display: inline-flex; gap: .18rem; padding: .2rem; border: 1px solid var(--line); border-radius: 9px; background: #f6f0eb; }
.view-tabs button { min-height: 31px; padding: .24rem .62rem; border-color: transparent; border-radius: 6px; background: transparent; color: var(--muted); font-size: .81rem; }
.view-tabs button[aria-pressed="true"] { border-color: #e3d5cc; background: #fffdfa; color: var(--accent-dark); }
.download-link { min-height: unset; padding: .38rem .57rem; font-size: .78rem; text-decoration: none; }
#detail-text {
  margin: .67rem 0 0;
  padding: .76rem .83rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fcf8f3;
  font: inherit;
  font-size: .87rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: keep-all;
  white-space: pre-wrap;
}
.recording-box { margin-top: .88rem; }
.speaker-editor { margin-top: .75rem; font-size: .87rem; }
.speaker-editor summary { width: fit-content; padding: .3rem .25rem; font-weight: 750; }
#speaker-form { padding: .65rem; border: 1px solid var(--line); border-radius: 9px; }
#speaker-form > button { margin-top: .6rem; }
#speaker-fields { display: grid; gap: .55rem; }
.speaker-field { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .4rem; }
.speaker-field select { min-width: 7rem; max-width: 12rem; min-height: 41px; padding: .3rem; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.speaker-field small { display: block; color: var(--muted); font-size: .79rem; }
.recording-box > span { color: var(--muted); font-size: .8rem; font-weight: 750; }
audio { display: block; width: min(100%, 34rem); height: 40px; margin-top: .27rem; }

@media (max-width: 58rem) {
  #recording-tools { gap: 2.5rem; }
  .auth-layout { gap: 2.45rem; padding: 2.35rem; }
}
@media (max-width: 45rem) {
  .workspace-header { grid-template-columns: minmax(0, 1fr) auto; gap: .25rem .5rem; padding: .7rem 0 .2rem; }
  .workspace-nav { grid-row: 2; justify-self: start; gap: .55rem; }
  .account-actions { grid-column: 2; grid-row: 1 / 3; gap: .3rem; }
  .roster, #logout { font-size: .76rem; }
  .roster ul { max-width: 15rem; }
  .workspace-body { padding-top: 1rem; }
  #recording-tools { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .recording-photo { padding: 8px; border-radius: 16px; }
  .auth-layout { grid-template-columns: 1fr; max-width: 31rem; min-height: 0; padding: 1.85rem; }
  .auth-photo { display: none; }
}
@media (max-width: 32rem) {
  .workspace-header, .workspace-body, .auth-layout { width: calc(100% - 1.65rem); }
  .workspace-header .brand { font-size: .83rem; }
  .workspace-header .brand-mark { width: 30px; height: 30px; flex-basis: 30px; }
  #recording-tools { padding: 1.28rem 1.03rem; }
  .gradient-surface { border-radius: 19px; }
  .auth-layout { margin-top: clamp(1.1rem, 7vh, 3rem); padding: 1.57rem 1.18rem; }
}

/* Match the Android recording screen in the in-app meeting view. */
html[data-native] {
  color: #123356;
  background: #eaf6ff;
  font-family: system-ui, sans-serif;
  --ink: #123356;
  --muted: #466782;
  --accent: #1763bc;
  --accent-dark: #145698;
  --line: #cce1f3;
  --paper: #fff;
  --wash: #dceeff;
  --shadow: 0 8px 24px #12335612;
  --serif: system-ui, sans-serif;
}
[data-native] :focus-visible { outline-color: var(--accent); }
[data-native] .workspace-header,
[data-native] .workspace-body { width: min(44rem, calc(100% - 44px)); }
[data-native] .workspace-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: .72rem;
  min-height: 0;
  padding: 28px 0 0;
  border: 0;
}
[data-native] .native-title { display: block; grid-column: 1 / -1; }
[data-native] .native-title p { margin-bottom: .24rem; color: var(--accent); font-size: .875rem; font-weight: 650; }
[data-native] .native-title h1 { font-size: 2rem; line-height: 1.18; letter-spacing: -.035em; }
[data-native] .workspace-header .brand,
[data-native] .workspace-context { display: none; }
[data-native] .workspace-nav { grid-column: 1; grid-row: 2; justify-self: stretch; }
[data-native] .workspace-nav a {
  width: 100%;
  min-height: 44px;
  padding: .55rem .8rem;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  text-align: center;
}
[data-native] .account-actions { grid-column: 2; grid-row: 2; }
[data-native] .roster summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: .55rem .8rem;
  border-radius: 12px;
  background: var(--wash);
  color: var(--accent-dark);
}
[data-native] .workspace-body { padding-top: .72rem; }
[data-native] #library { padding: 16px; border: 0; border-radius: 19px; box-shadow: none; }
[data-native] .section-heading h2 { font-size: 1.18rem; letter-spacing: -.03em; }
[data-native] button, [data-native] .download-link { background: var(--paper); }
[data-native] button:hover:not(:disabled), [data-native] .download-link:hover { background: #eff7ff; }
[data-native] .meeting-row[aria-current="true"],
[data-native] .view-tabs button[aria-pressed="true"] { border-color: #83b2df; background: var(--wash); color: var(--accent-dark); }
[data-native] .stage:not([data-stage="ready"]) { background: #eef5fc; }
[data-native] .view-tabs, [data-native] #detail-text { background: #f4faff; }
[data-native] .auth-layout { min-height: 0; grid-template-columns: minmax(0, 1fr); background: var(--paper); }
[data-native] .auth-layout::before, [data-native] .auth-photo { display: none; }
[data-native] #auth-submit { background: var(--accent); color: #fff; }
