@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --ink: #14231f;
  --muted: #65736e;
  --paper: #f3f0e8;
  --panel: #fcfbf6;
  --line: #d9d8cf;
  --green: #1e7458;
  --green-dark: #0c3e30;
  --lime: #c8e86b;
  --red: #a7463d;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 8%, rgba(200,232,107,.25), transparent 22rem),
    linear-gradient(180deg, #f6f4ed 0%, var(--paper) 100%);
  font-family: "Manrope", sans-serif;
}
button, textarea { font: inherit; }
button { color: inherit; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 40px 0; }
.workspace { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--panel); box-shadow: 0 24px 70px rgba(26,49,41,.08); }
.input-panel, .results-panel { min-width: 0; padding: 28px; }
.input-panel { display: flex; flex-direction: column; background: var(--green-dark); color: #f7f4eb; }
.results-panel { min-height: 570px; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }
.panel-heading > div { display: flex; align-items: center; gap: 11px; }
.step { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; font-family: "DM Mono", monospace; font-size: 10px; }
.result-heading .step { border-color: var(--line); color: var(--green); }
h2 { margin: 0; font-size: 15px; letter-spacing: -.02em; }
.clear-button { padding: 2px; border: 0; color: #d7e7df; background: transparent; cursor: pointer; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.clear-button:hover { color: var(--lime); }
textarea { flex: 1; width: 100%; min-height: 430px; resize: vertical; padding: 19px; border: 1px solid rgba(255,255,255,.13); border-radius: 10px; outline: none; color: #eef6f1; background: rgba(0,0,0,.15); font-family: "DM Mono", monospace; font-size: 12px; line-height: 1.7; }
textarea::placeholder { color: #8ba59b; }
textarea:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(200,232,107,.12); }
.input-footer { display: flex; justify-content: space-between; padding-top: 13px; color: #98afa6; font-family: "DM Mono", monospace; font-size: 10px; }
.status { padding: 6px 10px; border-radius: 99px; color: var(--green); background: #e4efe9; font-family: "DM Mono", monospace; font-size: 9px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.empty-state { display: grid; place-items: center; min-height: 430px; text-align: center; }
.empty-state h3 { margin: 20px 0 7px; font-size: 18px; }
.empty-state p { max-width: 360px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.clock-face { position: relative; width: 88px; height: 88px; border: 1px solid #b7c9c0; border-radius: 50%; background: #eff4ef; }
.clock-face::before, .clock-face::after { content: ""; position: absolute; left: 43px; bottom: 43px; width: 1px; background: var(--green); transform-origin: bottom; }
.clock-face::before { height: 27px; transform: rotate(22deg); }
.clock-face::after { height: 19px; transform: rotate(112deg); }
.clock-face span { position: absolute; inset: 40px; border-radius: 50%; background: var(--green); }
.stats { display: grid; grid-template-columns: .65fr 1fr 1.4fr; gap: 1px; margin-bottom: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.stats div { padding: 16px; background: #f8f7f1; }
.stats span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; }
.stats strong { font-family: "DM Mono", monospace; font-size: 19px; font-weight: 500; }
.table-wrap { max-height: 260px; overflow: auto; border-bottom: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 10px 9px; color: var(--muted); font-size: 9px; letter-spacing: .09em; text-align: left; text-transform: uppercase; }
td { padding: 12px 9px; border-top: 1px solid #e8e6de; }
td:last-child, th:last-child { text-align: right; }
td:nth-child(3), th:nth-child(3) { text-align: center; }
.player-name { font-weight: 700; }
.job-pill { display: inline-block; padding: 3px 7px; border-radius: 5px; color: var(--green-dark); background: #e7efe9; text-transform: capitalize; }
.time-cell { font-family: "DM Mono", monospace; font-weight: 500; }
.notices { margin: 15px 0; padding: 10px 12px; border-left: 3px solid #d39a3b; color: #75531b; background: #fff7e7; font-size: 11px; line-height: 1.5; }
.report-block { display: flex; justify-content: space-between; align-items: center; padding: 22px 0 12px; }
.report-block h3 { margin: 0 0 3px; font-size: 13px; }
.report-block p { margin: 0; color: var(--muted); font-size: 11px; }
.copy-button { padding: 9px 13px; border: 0; border-radius: 7px; color: white; background: var(--green); cursor: pointer; font-size: 11px; font-weight: 700; }
.copy-button:hover { background: #165f48; }
.copy-button:focus-visible, button:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
pre { max-height: 170px; margin: 0; overflow: auto; padding: 13px; border-radius: 8px; color: #dfeae5; background: #15261f; white-space: pre-wrap; font-family: "DM Mono", monospace; font-size: 10px; line-height: 1.55; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 800px) {
  .shell { width: min(100% - 24px, 620px); padding: 12px 0; }
  .workspace { grid-template-columns: 1fr; }
  .input-panel, .results-panel { padding: 22px; }
  textarea { min-height: 340px; }
  .results-panel { min-height: auto; }
  .empty-state { min-height: 350px; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .wide { grid-column: 1 / -1; }
  th:nth-child(2), td:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
