:root {
  color: #17241f;
  background: #f4f5f2;
  font-family: Inter, "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
  --green: #214b3d;
  --green-dark: #15372c;
  --orange: #b66a2b;
  --line: #d8ddd9;
  --muted: #69756f;
  --surface: #fff;
}

* { box-sizing: border-box; }
html, body, #app { min-height: 100%; }
body { margin: 0; background: #f4f5f2; }
button, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #b7ccbf; outline-offset: 2px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { min-height: 100vh; }
.site-header {
  height: 62px;
  display: flex;
  align-items: center;
  padding: 0 32px;
  background: var(--green-dark);
  color: #fff;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  cursor: pointer;
}
.brand-symbol {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--orange);
  font-size: 15px;
  letter-spacing: 0;
}
.screen-name {
  margin-left: 22px;
  padding-left: 22px;
  border-left: 1px solid #48645b;
  color: #aebeb8;
  font-size: 11px;
}

.dashboard { width: min(1040px, calc(100% - 40px)); margin: 0 auto; padding: 48px 0 40px; }
.spotlight-overlay {
  position: fixed;
  z-index: 30;
  inset: 0;
  background: rgb(8 17 14 / 62%);
  cursor: pointer;
  animation: spotlight-fade-in .22s ease-out;
}
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.eyebrow { margin: 0 0 7px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 25px; font-weight: 650; letter-spacing: -.025em; }
h2 { margin-bottom: 0; font-size: 15px; font-weight: 650; }
.secondary-button, .back-button, .ai-button, .send-button, .bulk-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 3px;
  font-weight: 700;
  cursor: pointer;
}
.heading-actions { display: flex; align-items: center; gap: 9px; }
.bulk-button { min-width: 174px; min-height: 41px; padding: 9px 15px; border: 1px solid #c56c22; background: #c56c22; color: #fff; font-size: 10px; box-shadow: 0 4px 11px #92501f33; }
.bulk-button:focus { outline: 3px solid #e7a66f; outline-offset: 4px; }
.bulk-button:hover:not(:disabled) { border-color: #a85619; background: #a85619; transform: translateY(-1px); box-shadow: 0 7px 17px #92501f42; }
.bulk-button:disabled { border-color: #aebbb4; background: #aebbb4; cursor: default; }
.bulk-button:disabled { box-shadow: none; animation: none; }
.bulk-button svg { width: 18px; height: 18px; }
.secondary-button { min-height: 37px; padding: 8px 13px; border: 1px solid #bdc6c1; background: #fff; font-size: 11px; }
.secondary-button:hover { border-color: #7d9187; background: #f9faf8; }
.secondary-button svg { width: 15px; height: 15px; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.metric { min-height: 142px; padding: 20px 22px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric > span { display: block; color: var(--muted); font-size: 10px; font-weight: 650; }
.metric strong { display: block; margin-top: 10px; font-size: 29px; font-weight: 600; line-height: 1; }
.metric strong small { margin-left: 4px; color: var(--muted); font-size: 10px; }
.metric > small { display: block; margin-top: 7px; color: #8a562a; font-size: 9px; }

.bulk-action {
  position: relative;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 14px 16px 14px 20px;
  border: 1px solid #d5a477;
  border-left: 3px solid var(--orange);
  background: linear-gradient(120deg, #fffaf3, #f8eee2);
  box-shadow: 0 4px 14px #8a562a16;
}
.bulk-action.is-spotlighted {
  z-index: 31;
}
.bulk-action-copy { min-width: 0; display: flex; align-items: center; gap: 12px; }
.bulk-action-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #f1d8bf; color: #8a562a; }
.bulk-action-icon svg { width: 17px; height: 17px; }
.bulk-action-copy strong { display: block; color: #704821; font-size: 12px; }
.bulk-action-copy small { display: block; margin-top: 5px; color: #8a6747; font-size: 9px; }

.bulk-panel { margin-bottom: 18px; padding: 20px 22px; border: 1px solid #b9c9c1; border-left: 3px solid var(--green); background: #f8faf8; }
.bulk-progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.bulk-progress-heading h2 { font-size: 14px; }
.bulk-progress-heading > strong { display: flex; align-items: baseline; gap: 5px; color: var(--green); font-size: 19px; white-space: nowrap; }
.bulk-progress-heading > strong small { color: var(--muted); font-size: 8px; }
.progress-track { height: 4px; margin: 16px 0; overflow: hidden; background: #dfe6e2; }
.progress-track span { height: 100%; display: block; background: var(--green); transition: width .25s ease; }
.bulk-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.bulk-item { min-width: 0; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; padding: 9px 10px; border: 1px solid #e0e5e2; background: #fff; color: #8a938f; }
.bulk-item.working { border-color: #a9bdb3; background: #f0f5f2; color: var(--green); }
.bulk-item.done { color: #3f6154; }
.bulk-state-icon { grid-row: 1 / 3; width: 18px; height: 18px; display: grid; place-items: center; }
.bulk-state-icon svg { width: 13px; height: 13px; }
.bulk-item.working .bulk-state-icon svg { animation: pulse 1s infinite ease-in-out; }
.bulk-item strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.bulk-item small { margin-top: 2px; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.bulk-panel.is-complete { display: flex; align-items: center; gap: 14px; border-color: #9fbeae; background: #f1f7f3; }
.bulk-panel.is-complete h2 { margin-bottom: 5px; color: #275b44; }
.bulk-panel.is-complete p:last-child { margin-bottom: 0; color: #617068; font-size: 9px; }
.bulk-complete-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #fff; }
.bulk-complete-icon svg { width: 18px; height: 18px; }

.applicant-panel { overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.panel-heading { min-height: 58px; display: flex; align-items: center; gap: 8px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.panel-heading > span { color: var(--muted); font-size: 10px; }
.applicant-list { display: flex; flex-direction: column; }
.applicant-row {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 140px 150px 20px;
  align-items: center;
  gap: 20px;
  padding: 10px 20px;
  border: 0;
  border-bottom: 1px solid #e8ebe8;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.applicant-row:last-child { border-bottom: 0; }
.applicant-row:hover { background: #f7f9f7; }
.applicant-row.needs-action { box-shadow: inset 3px 0 var(--orange); background: #fdfaf5; }
.applicant-row.needs-action:hover { background: #faf5ec; }
.applicant-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.applicant-main strong { font-size: 13px; font-weight: 650; }
.applicant-main small { display: flex; align-items: center; gap: 5px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.channel-mark { width: 18px; height: 18px; flex: 0 0 auto; display: inline-grid; place-items: center; border: 1px solid #cbd2cd; background: #f1f3f1; color: #475750; font-size: 8px; font-weight: 700; }
.status-badge { display: inline-block; padding: 4px 7px; border: 1px solid #cbd6d0; background: #eff4f1; color: #345c4d; font-size: 9px; font-weight: 700; }
.status-内定 { border-color: #a9c6b4; background: #e8f3ec; color: #276040; }
.status-辞退, .status-不採用 { border-color: #d6d8d7; background: #f3f4f3; color: #777f7b; }
.applicant-update { display: flex; flex-direction: column; gap: 4px; color: #52605a; font-size: 10px; }
.applicant-update small { color: #8a938f; font-size: 8px; }
.applicant-update.overdue strong { color: #8c5628; font-size: 10px; }
.applicant-update.overdue small { color: #9b714c; }
.row-arrow { color: #89958f; }
.row-arrow svg { width: 15px; height: 15px; }
.demo-note { margin: 12px 2px 0; color: #8b948f; font-size: 9px; }

.chat-page { width: min(920px, calc(100% - 40px)); margin: 0 auto; padding: 30px 0; }
.tutorial-overlay {
  position: fixed;
  z-index: 30;
  inset: 0;
  background: rgb(8 17 14 / 62%);
  pointer-events: none;
  animation: spotlight-fade-in .22s ease-out;
}
.is-tutorial-target { position: relative; z-index: 31; }
.tutorial-guide {
  position: fixed;
  z-index: 32;
  left: 50%;
  width: min(520px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 18px;
  padding: 15px 18px;
  border: 1px solid #d5a477;
  border-left: 3px solid var(--orange);
  background: #fffaf3;
  color: #4f351d;
  transform: translateX(-50%);
  box-shadow: 0 12px 28px rgb(0 0 0 / 22%);
}
.tutorial-guide-opening { top: 74px; }
.tutorial-guide-generating,
.tutorial-guide-reviewing { bottom: 250px; }
.tutorial-guide-sending { bottom: 80px; }
.tutorial-guide small { grid-column: 1; color: #9a602d; font-size: 9px; font-weight: 700; letter-spacing: .06em; }
.tutorial-guide strong { grid-column: 1; font-size: 12px; line-height: 1.6; }
.tutorial-guide > span { grid-column: 2; grid-row: 1 / 3; align-self: center; color: #8a6747; font-size: 10px; font-weight: 700; white-space: nowrap; }
.chat-header { min-height: 73px; display: grid; grid-template-columns: 170px 1fr 180px; align-items: center; padding: 0 22px; border: 1px solid var(--line); background: #fff; }
.back-button { justify-self: start; padding: 7px 8px 7px 3px; border: 0; background: transparent; color: #40534b; font-size: 10px; }
.back-button:hover { color: var(--green); }
.back-button svg { width: 18px; height: 18px; }
.chat-person { min-width: 0; text-align: center; }
.chat-person .eyebrow { margin-bottom: 4px; font-size: 8px; }
.chat-person h1 { overflow: hidden; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.status-control { justify-self: end; display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 8px; }
.status-control select { min-width: 126px; height: 31px; padding: 0 28px 0 9px; border: 1px solid #cbd2cd; border-radius: 2px; background: #fff; color: #30433b; font-size: 10px; font-weight: 650; }
.chat-summary { min-height: 45px; display: flex; align-items: center; justify-content: center; gap: 0; padding: 8px 20px; border: 1px solid var(--line); border-top: 0; background: #fafbf9; color: #59665f; font-size: 9px; }
.chat-summary > span { display: inline-flex; align-items: center; gap: 5px; padding: 0 18px; white-space: nowrap; }
.chat-summary > span + span { border-left: 1px solid #dce1dd; }

.bulk-chat-status { min-height: 56px; display: grid; grid-template-columns: 34px auto 1fr; align-items: center; gap: 11px; padding: 9px 18px; border: 1px solid #d6c4af; border-top: 0; background: #fff8ed; color: #65441f; }
.bulk-chat-status-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #c56c22; color: #fff; }
.bulk-chat-status-icon svg { width: 15px; height: 15px; animation: pulse 1s infinite ease-in-out; }
.bulk-chat-status p { margin: 0 0 3px; font-size: 9px; font-weight: 700; letter-spacing: .04em; }
.bulk-chat-status p strong { margin-left: 5px; font-size: 10px; }
.bulk-chat-status div > span { display: block; font-size: 11px; font-weight: 700; }
.bulk-chat-progress { justify-self: end; width: min(210px, 100%); height: 4px; overflow: hidden; background: #eadfce; }
.bulk-chat-progress span { height: 100%; display: block; background: var(--orange); transition: width .25s ease; }

.conversation { height: calc(100vh - 240px); min-height: 520px; display: flex; flex-direction: column; border: 1px solid var(--line); border-top: 0; background: #f6f7f4; }
.messages { min-height: 180px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 28px 32px 24px; scrollbar-width: thin; scrollbar-color: #c4cbc7 transparent; }
.message { max-width: 72%; display: flex; flex-direction: column; gap: 5px; }
.message.candidate { align-self: flex-start; align-items: flex-start; }
.message.staff { align-self: flex-end; align-items: flex-end; }
.bubble { padding: 10px 13px; border: 1px solid #d5dad7; border-radius: 2px 11px 11px 11px; background: #fff; color: #2b3833; font-size: 11px; line-height: 1.7; }
.message.staff .bubble { border-color: var(--green); border-radius: 11px 2px 11px 11px; background: var(--green); color: #fff; }
.message time { color: #7e8983; font-size: 8px; }

.composer { flex: 0 0 auto; margin: 0 22px 22px; border: 1px solid #c6cec9; background: #fff; }
.composer:focus-within { border-color: #718e80; outline: 2px solid #e1e9e4; }
.composer.is-generating { background: #fbfcfb; }
.composer-top, .composer-bottom { min-height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; }
.composer-top { border-bottom: 1px solid #e4e8e5; }
.composer-top > span { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.composer textarea { width: 100%; min-height: 92px; display: block; resize: vertical; padding: 11px 12px; border: 0; outline: 0; background: transparent; color: #25332d; font-size: 11px; line-height: 1.65; }
.composer textarea::placeholder { color: #9ba39f; }
.composer-bottom { min-height: 39px; padding-top: 3px; }
.composer-bottom small { color: #8b948f; font-size: 8px; }
.ai-button { min-height: 29px; padding: 5px 9px; border: 1px solid #b7c9c0; background: #edf3ef; color: var(--green); font-size: 9px; }
.ai-button:hover:not(:disabled) { border-color: #6e8d7e; background: #e4ece7; }
.ai-button:disabled { cursor: wait; opacity: .8; }
.ai-button svg, .send-button svg { width: 13px; height: 13px; }
.send-button { min-width: 72px; min-height: 31px; padding: 6px 11px; border: 1px solid var(--green); background: var(--green); color: #fff; font-size: 9px; }
.send-button:hover:not(:disabled) { background: var(--green-dark); }
.send-button:disabled { border-color: #d6dbd7; background: #e5e8e6; color: #9aa39e; cursor: default; }
.typing-dots { display: inline-flex; gap: 3px; }
.typing-dots b { width: 3px; height: 3px; border-radius: 50%; background: currentColor; animation: typing 1s infinite ease-in-out; }
.typing-dots b:nth-child(2) { animation-delay: .15s; }
.typing-dots b:nth-child(3) { animation-delay: .3s; }

.toast { position: fixed; z-index: 20; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 11px 16px; border: 1px solid #3c5c51; background: #18382e; color: #fff; font-size: 10px; box-shadow: 0 8px 25px #10251d26; }

@keyframes typing { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
@keyframes pulse { 0%, 100% { opacity: .45; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes spotlight-fade-in { from { opacity: 0; } }

@media (max-width: 700px) {
  .site-header { height: 56px; padding: 0 18px; }
  .screen-name { margin-left: 15px; padding-left: 15px; }
  .dashboard { width: min(100% - 24px, 1040px); padding-top: 28px; }
  .page-heading { align-items: flex-start; gap: 14px; }
  .heading-actions { flex-direction: column; align-items: stretch; }
  .bulk-list { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 21px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 92px; padding: 16px; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .metric strong { font-size: 25px; }
  .bulk-action { align-items: stretch; flex-direction: column; gap: 12px; padding: 15px; }
  .bulk-action .bulk-button { width: 100%; }
  .applicant-row { grid-template-columns: minmax(0, 1fr) auto 18px; gap: 10px; padding: 11px 14px; }
  .applicant-status { display: none; }
  .applicant-update { align-items: flex-end; text-align: right; }
  .chat-page { width: 100%; padding: 0; }
  .tutorial-guide-opening { top: 64px; }
  .tutorial-guide-generating,
  .tutorial-guide-reviewing { bottom: 260px; }
  .tutorial-guide-sending { bottom: 75px; }
  .chat-header { grid-template-columns: 42px 1fr 120px; min-height: 70px; padding: 0 12px; border-inline: 0; }
  .back-button { padding: 8px; }
  .back-button span { display: none; }
  .status-control span { display: none; }
  .status-control select { min-width: 112px; }
  .chat-summary { border-inline: 0; overflow-x: auto; justify-content: flex-start; padding-inline: 8px; }
  .chat-summary > span { padding-inline: 10px; }
  .bulk-chat-status { grid-template-columns: 32px 1fr; border-inline: 0; }
  .bulk-chat-progress { display: none; }
  .conversation { height: calc(100vh - 171px); min-height: 470px; border-inline: 0; border-bottom: 0; }
  .messages { padding: 22px 16px; }
  .message { max-width: 88%; }
  .composer { margin: 0 10px 10px; }
}

@media (max-width: 420px) {
  .brand > span:last-child { display: none; }
  .screen-name { border-left: 0; }
  .secondary-button span { display: none; }
  .secondary-button { width: 37px; padding: 0; }
  .heading-actions { flex-direction: row; }
  .bulk-list { grid-template-columns: 1fr; }
  .applicant-main small { max-width: 210px; }
  .applicant-update:not(.overdue) { display: none; }
  .applicant-row { grid-template-columns: minmax(0, 1fr) auto 16px; }
  .chat-header { grid-template-columns: 40px 1fr 102px; }
  .status-control select { min-width: 98px; padding-left: 6px; }
  .chat-person h1 { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
