:root {
  font-family: "Arial Rounded MT Bold", ui-rounded, Inter, ui-sans-serif, system-ui, sans-serif;
  color: #1b2521;
  background: #f6f1e7;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #f6f1e7;
}

button, input { font: inherit; }

.app-shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 54px 0 42px; }
header { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 32px; }
h1, h2, p { margin: 0; }
h1 { color: #12403d; font-size: clamp(2.25rem, 5vw, 3.65rem); letter-spacing: -.07em; line-height: .95; }
.brand-lockup { display: grid; grid-template-columns: 70px 1fr; column-gap: 15px; align-items: center; }
.brand-lockup img { grid-row: span 2; width: 70px; height: 70px; }
.subtitle { margin-top: 8px; color: #e8663d; font-size: .95rem; font-weight: 800; }
.date-label { grid-column: 2; margin-top: 8px; color: #607069; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.text-button { border: 1px solid #12403d; border-radius: 999px; padding: 9px 14px; color: #12403d; background: transparent; cursor: pointer; }
.text-button:hover { color: #f6f1e7; background: #12403d; }

.punch-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.calculation-card { margin-bottom: 14px; border: 1px solid #d8d0c1; border-radius: 14px; padding: 14px 18px; background: #fffdf8; }
.calculation-toggle { display: flex; align-items: center; gap: 10px; margin: 0; color: #12403d; font-size: .9rem; font-weight: 800; cursor: pointer; }
.calculation-toggle input { width: 18px; height: 18px; margin: 0; accent-color: #e8663d; cursor: pointer; }
.how-to-card { margin-bottom: 14px; border: 1px solid #d8d0c1; border-radius: 14px; padding: 14px 18px; background: #fffdf8; color: #607069; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .9rem; }
.punch-card, .summary-card { border: 1px solid #d8d0c1; border-radius: 18px; background: #fffdf8; }
.punch-card { position: relative; min-height: 356px; padding: 22px; overflow: hidden; }
.punch-card::before { content: ""; position: absolute; width: 90px; height: 7px; left: 22px; top: 0; border-radius: 0 0 9px 9px; background: #12403d; }
.step { color: #e8663d; font-size: .75rem; font-weight: 800; letter-spacing: .1em; }
h2 { margin: 10px 0 24px; font-size: 1.22rem; }
label, .hint { display: block; margin-bottom: 7px; color: #607069; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .75rem; font-weight: 650; }
.hint { margin: 17px 0 6px; }
input, output { width: 100%; border: 1px solid #d8d0c1; border-radius: 9px; padding: 10px 11px; color: #12403d; background: #f6f1e7; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.time-row { display: flex; gap: 7px; }
.time-row input { min-width: 0; }
.save-time { border: 1px solid #12403d; border-radius: 9px; padding: 0 12px; color: #12403d; background: transparent; font-size: .78rem; font-weight: 800; cursor: pointer; }
.save-time:hover { color: #f6f1e7; background: #12403d; }
output { display: block; color: #12403d; font-weight: 750; }
.suggestion { color: #e8663d; }
button[data-punch] { position: absolute; right: 22px; bottom: 22px; left: 22px; display: grid; gap: 2px; border: 0; border-radius: 10px; padding: 9px 11px; color: #fffdf8; background: #e8663d; cursor: pointer; transition: filter .15s, transform .15s; }
button[data-punch] strong { font-size: .9rem; } button[data-punch] small { font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .62rem; font-weight: 650; line-height: 1.15; }
button[data-punch]:hover { filter: brightness(.94); transform: translateY(-1px); }

.break-ranges { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 17px; }
.break-ranges span { display: grid; gap: 3px; border-radius: 9px; padding: 8px; background: #f6f1e7; }
.break-ranges small { color: #607069; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .65rem; } .break-ranges strong { color: #12403d; font-family: ui-monospace, monospace; font-size: .9rem; }
.summary-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-top: 14px; }
.summary-card { padding: 24px; } .summary-card p { color: #607069; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .86rem; } .summary-card strong { display: block; margin: 8px 0; color: #12403d; font-family: ui-monospace, monospace; font-size: clamp(1.7rem, 4vw, 2.5rem); letter-spacing: -.06em; } .summary-card span { color: #607069; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .78rem; }
.overtime { border-color: #edc2b0; background: #fff5f0; }.overtime strong { color: #e8663d; }
.negative { border-color: #d8d0c1; background: #f2f7f2; }.negative strong { color: #12403d; }
.entry-options { display: grid; gap: 7px; }
.entry-options span { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-radius: 9px; padding: 8px 10px; background: #f6f1e7; }
.entry-options small { color: #607069; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .68rem; }.entry-options strong { color: #12403d; font-family: ui-monospace, monospace; font-size: .95rem; }
.entry-options p { color: #607069; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .75rem; line-height: 1.35; }
.reverse-mode [data-card="entry"] { order: 1; }.reverse-mode [data-card="return"] { order: 2; }.reverse-mode [data-card="lunch"] { order: 3; }.reverse-mode [data-card="exit"] { order: 4; }

@media (max-width: 820px) { .punch-grid { grid-template-columns: repeat(2, 1fr); } .punch-card { min-height: 340px; } }
@media (max-width: 520px) { .app-shell { width: min(100% - 24px, 1120px); padding-top: 28px; } header { align-items: flex-start; margin-bottom: 24px; } .brand-lockup { grid-template-columns: 56px 1fr; column-gap: 10px; } .brand-lockup img { width: 56px; height: 56px; } .punch-grid, .summary-grid { grid-template-columns: 1fr; } .punch-card { min-height: 330px; } }
