:root {
  color-scheme: light;
  --ink: #1a201d;
  --paper: #f4f4ef;
  --line: #d9dcd3;
  --muted: #536056;
  --accent: #ff6d2c;
  font: 100%/1.55 "Inter", "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {box-sizing: border-box}
[hidden] {display: none !important}
body {margin: 0}
button, input, select, textarea {font: inherit}
button {cursor: pointer}
button:disabled {cursor: default; opacity: .55}
a {color: inherit}
:focus-visible {outline: 3px solid #2d72a0; outline-offset: 3px}
button, a, input, select, textarea {touch-action: manipulation}
h1, h2, h3, p {margin: 0}
h1 {font-size: clamp(2rem, 3vw, 2.8rem); line-height: 1.15; letter-spacing: -.05em}
h2 {font-size: 1.17rem; line-height: 1.4}
h3 {font-size: 1rem}
svg {width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0}
.brand {display: inline-flex; gap: .65rem; align-items: center; font: 900 1.46rem/1 "Arial", sans-serif; letter-spacing: -.075em}
.brand-light {color: #f7f6ed}
.symbols {position: absolute; width: 0; height: 0; overflow: hidden}
.brand-mark {width: 2.02rem; height: 1.65rem; color: var(--accent); stroke: none}
.eyebrow, .nav-title {font: 700 .76rem/1.5 "Courier New", monospace; letter-spacing: .12em}
.eyebrow {color: #a13a0e; margin-bottom: .5rem}
.subtle {color: var(--muted); font-size: .94rem}
.gate {min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 46% 54%}
.gate-cover {position: relative; isolation: isolate; min-height: 32rem; padding: clamp(1.5rem, 4.4vw, 5rem); display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; color: white; background: #202521 url('/assets/hero.webp') 67% center/cover no-repeat}
.gate-cover::before {content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(17,23,20,.85), rgba(17,23,20,.12) 36%, rgba(17,23,20,.87))}
.cover-type .eyebrow {color: #ff9d6e; margin-bottom: 1rem}
.cover-type p {font-size: clamp(2.3rem, 4.2vw, 4.7rem); line-height: 1.14; font-weight: 800; letter-spacing: -.05em}
.gate-form-area {position: relative; display: grid; align-content: center; justify-items: center; padding: 5rem clamp(1.5rem, 5vw, 7rem)}
.gate-actions {position: absolute; right: clamp(1.5rem, 4vw, 4rem); top: 2rem; display: flex; align-items: center; gap: 1rem}
.store-link {font-weight: 650; font-size: .9rem; text-underline-offset: .24em}
.login-card {width: min(100%, 25rem)}
.login-card h1 {margin-bottom: 1rem}
.login-card form {margin-top: 2rem}
label {display: grid; gap: .35rem; font-size: .9rem; font-weight: 650}
input, select, textarea {background: #fff; color: var(--ink); border: 1px solid #aeb8ad; border-radius: 3px; min-height: 2.7rem; padding: .53rem .7rem; width: 100%; font-weight: 400}
textarea {resize: vertical}
select {appearance: none; padding-right: 2rem; background-image: linear-gradient(45deg, transparent 50%, #5a615b 50%),linear-gradient(135deg, #5a615b 50%, transparent 50%); background-position: calc(100% - 15px) 50%,calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat}
.locale-select {width: auto; min-height: 2.5rem; font-size: .88rem}
.header-actions .locale-select {background-color: #e9ece4}
.dialog-tools {display: flex; align-items: center; flex: none; gap: .5rem}
.password-field {position: relative; margin-top: .45rem}
.password-field input {padding-right: 3.7rem}
.password-field button {position: absolute; border: 0; background: transparent; color: var(--muted); font-size: .88rem; font-weight: 650; right: 1px; top: 1px; bottom: 1px; padding: 0 .75rem}
.primary, .secondary {border: 1px solid var(--ink); border-radius: 3px; background: var(--ink); color: white; padding: .55rem 1.1rem; min-height: 2.65rem; font-size: .92rem; font-weight: 700}
.primary {background: var(--accent); color: #231c16; border-color: var(--accent)}
.primary:not(:disabled):hover {background: #ff854c; border-color: #ff854c}
.secondary {color: var(--ink); background: transparent; border-color: #bfc6bb}
.secondary:not(:disabled):hover {background: #e7eae2}
.wide {width: 100%; margin-top: .75rem}
.error {color: #ab3020; overflow-wrap: anywhere; font-size: .92rem}
.error:not(:empty) {margin: .7rem 0}
.masthead {min-height: 4.2rem; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding: .7rem clamp(1rem, 3.2vw, 3.5rem); background: var(--ink); color: white}
.header-actions, .actions, .pager, .dialog-foot {display: flex; align-items: center; gap: .65rem}
.header-actions a, .header-actions button {font-size: .9rem; color: #f4f4ee; font-weight: 600; text-decoration: none; min-height: 2.5rem; display: inline-flex; align-items: center; padding: .3rem .65rem}
.header-actions button {background: transparent; border: 1px solid #687168; border-radius: 3px}
.header-actions a:hover {text-decoration: underline}
.layout {display: grid; grid-template-columns: minmax(11rem, 14.6rem) minmax(0, 1fr); min-height: calc(100vh - 4.2rem)}
.sidebar {background: #e8ebe3; border-right: 1px solid var(--line); padding: 2.6rem 1.1rem}
.nav-title {color: #5a665e; font-family: inherit; padding-left: .8rem; margin-bottom: 1rem}
.nav-item {display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 2.8rem; margin: .38rem 0; padding: .45rem .8rem; background: transparent; color: var(--muted); border: 0; border-radius: 3px; text-align: left; font-weight: 650}
.nav-item[aria-current="page"] {background: var(--ink); color: #fff}
.nav-item:not([aria-current]):hover {background: #dbe0d6}
.content {padding: clamp(1.4rem, 4.4vw, 4.2rem); max-width: 96rem; width: 100%; min-width: 0}
.view-head {display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem}
.notice:not(:empty) {padding: .75rem 1rem; background: #e7eae1; border-left: .22rem solid #7f8977; margin: 0 0 1rem; font-size: .94rem}
.notice[data-error="true"]:not(:empty) {border-color: #ad4329; color: #952e1b; background: #fff0e9}
.panel {background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow: hidden}
.panel-head, .catalog-tools {padding: 1.05rem 1.3rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap}
.catalog-tools {justify-content: flex-start}
.catalog-tools .subtle {margin-left: auto}
.catalog-tools select {width: auto; min-width: 8rem}
.searchbox {position: relative; min-width: 10rem; width: 19rem; max-width: 100%}
.searchbox svg {position: absolute; top: .8rem; left: .8rem; width: 1.1rem; height: 1.1rem; color: var(--muted)}
.searchbox input {padding-left: 2.4rem}
.table-wrap {width: 100%}
table {border-collapse: collapse; width: 100%; text-align: left}
th, td {padding: .9rem 1.2rem; text-align: left; overflow-wrap: anywhere; vertical-align: middle}
th {border-block: 1px solid var(--line); background: #f3f5f0; color: var(--muted); font-weight: 650; font-size: .84rem}
td {border-bottom: 1px solid #e5e8e0; font-size: .93rem}
tr:last-child td {border-bottom: 0}
td:last-child {text-align: right}
.cell-main {display: block; font-weight: 650}
.cell-sub {display: block; color: var(--muted); font-size: .84rem}
.product-cell {display: flex; gap: .75rem; align-items: center}
.product-cell img {width: 3.2rem; height: 3.2rem; border-radius: 3px; object-fit: cover; background: #eeeee9; flex: none}
.pill {display: inline-block; font-size: .82rem; font-weight: 650; border-radius: 2px; padding: .15rem .55rem; white-space: nowrap; color: #465649; background: #e9ece6}
.pill.on, .pill.in_progress {color: #245841; background: #deeee3}
.pill.new {color: #853508; background: #ffebdc}
.row-action {border: 0; background: transparent; color: #884019; font-weight: 700; padding: .45rem; min-height: 2.55rem; text-decoration: underline; text-underline-offset: .22rem}
.empty {text-align: center; padding: 3rem 1.2rem; color: var(--muted)}
.pager {justify-content: flex-end; flex-wrap: wrap; padding: .85rem 1.2rem; border-top: 1px solid var(--line); font-size: .87rem}
dialog {width: min(94vw, 37rem); background: #fff; color: var(--ink); padding: 0; border: 1px solid #9fa99f; border-radius: 5px; max-height: 90dvh; box-shadow: 0 1rem 4rem #10171030}
dialog::backdrop {background: #1018149c}
.dialog-head {display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.3rem 1.5rem; border-bottom: 1px solid var(--line); background: #f6f7f2}
.dialog-head h2 {font-size: 1.45rem; overflow-wrap: anywhere}
.dialog-head .eyebrow {margin-bottom: .25rem}
.close {width: 2.65rem; height: 2.65rem; background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 3px; font-size: 1.65rem; line-height: 1; flex: none}
.dialog-form, .inquiry-body {padding: 1.4rem 1.5rem; display: grid; gap: 1rem}
.two-col, .detail-grid {display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem}
.dialog-foot {justify-content: flex-end; padding-top: 1rem; border-top: 1px solid var(--line)}
.detail-grid {margin: 0; overflow-wrap: anywhere}
dt {font-size: .84rem; color: var(--muted)}
dd {margin: .15rem 0 0}
.inquiry-body h3 {margin-top: .45rem; margin-bottom: -.55rem}
.line-items {margin: 0; padding: 0; list-style: none; border-block: 1px solid var(--line)}
.line-items li {display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .65rem .25rem; overflow-wrap: anywhere}
.line-items li + li {border-top: 1px solid var(--line)}
.quantity {white-space: nowrap; font-weight: 650}
.customer-message {white-space: pre-wrap; overflow-wrap: anywhere; background: #f1f3ec; padding: .7rem .85rem}
#inquiry-form label {max-width: 18rem; margin-bottom: 1rem}
.sr-only {position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0}
@media (max-width: 850px) {
  .layout {display: block}
  .sidebar {padding: .55rem 1rem; border: 0; border-bottom: 1px solid var(--line); display: flex; gap: .6rem}
  .nav-title {display: none}
  .nav-item {width: auto; margin: 0; min-height: 2.55rem}
  .content {padding: 1.6rem 1rem}
}
@media (max-width: 630px) {
  .gate {display: block}
  .gate-cover {min-height: 9rem; padding: 1.4rem; background-position: 65% 50%}
  .cover-type {margin-top: 1.3rem}
  .cover-type .eyebrow {display: none}
  .cover-type p {font-size: 1.38rem}
  .cover-type br {display: none}
  :lang(en) .cover-type br::after {content: " "}
  :lang(en) .cover-type span + br + span {margin-left: .22em}
  .gate-form-area {padding: 4.4rem 1.45rem 2rem}
  .gate-actions {top: .9rem}
  .masthead {gap: .45rem}
  .masthead {flex-wrap: wrap}
  .masthead .brand {font-size: 1.06rem; gap: .4rem}
  .masthead .brand-mark {width: 1.4rem; height: 1.07rem}
  .header-actions {gap: .1rem}
  .header-actions a, .header-actions button {font-size: .82rem; padding-inline: .45rem}
  .view-head {align-items: center; margin-bottom: 1.15rem}
  .panel-head, .catalog-tools {padding: .85rem}
  .catalog-tools {gap: .55rem}
  .searchbox {width: 100%}
  table, tbody {display: block}
  thead {position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%)}
  tbody tr {display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .3rem .6rem; border-top: 1px solid var(--line); padding: .8rem}
  td {display: block; padding: 0; border: 0}
  .inquiry-table td:nth-child(2), .inquiry-table td:nth-child(3), .product-table td:nth-child(2) {grid-column: 1; color: var(--muted); font-size: .86rem}
  .inquiry-table td:nth-child(4), .product-table td:nth-child(3) {grid-column: 2; grid-row: 1; text-align: right}
  .inquiry-table td:last-child, .product-table td:last-child {grid-column: 2; grid-row: 2 / span 2; align-self: end}
  .dialog-head, .dialog-form, .inquiry-body {padding: 1rem}
  .dialog-form .two-col {grid-template-columns: minmax(0, 1fr)}
}
@media (max-width: 370px) {
  .two-col, .detail-grid {grid-template-columns: minmax(0, 1fr)}
  .actions {gap: .3rem}
  .actions button {padding-inline: .65rem}
}
