*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans KR",Arial,sans-serif;background:#f6f7f3;color:#14231d}button,input,select,textarea{font:inherit}button{cursor:pointer}.hidden{display:none!important}
.topbar{position:sticky;top:0;z-index:10;display:flex;justify-content:space-between;gap:16px;align-items:center;padding:18px 22px;background:#123a2b;color:#fff;box-shadow:0 10px 30px #0002}.eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.12em;opacity:.76}.topbar h1{margin:.1rem 0;font-size:25px}.subline{font-size:13px;opacity:.75}.top-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.layout{max-width:1280px;margin:0 auto;padding:18px;display:grid;gap:14px}.panel{background:#fff;border:1px solid #e5e7dc;border-radius:18px;padding:16px;box-shadow:0 12px 40px #0000000a}.search-row{display:grid;grid-template-columns:1fr auto;gap:10px}.search,input,select,textarea{width:100%;padding:12px 13px;border:1px solid #d7dccf;border-radius:12px;background:#fff;color:#14231d}.search{font-size:18px;font-weight:700}.filters{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}.filters select{max-width:240px}.status-line{display:flex;justify-content:space-between;margin-top:12px;color:#687268;font-size:14px}
.primary,.ghost,.warning,.danger{border:0;border-radius:12px;padding:11px 14px;font-weight:850}.primary{background:#123a2b;color:white}.ghost{background:#edf1e8;color:#163429}.warning{background:#f4b43f;color:#241600}.danger{background:#b42318;color:#fff}.icon-btn{border:0;background:#edf1e8;border-radius:12px;width:38px;height:38px;font-size:24px;color:#183326}.section-head{display:flex;justify-content:space-between;gap:10px;align-items:end;margin-bottom:12px}.section-head h2{margin:0;font-size:19px}.section-head span{color:#657068;font-size:14px}.admin-grid{display:flex;flex-wrap:wrap;gap:10px}
.table-wrap{overflow:auto;border-radius:14px;border:1px solid #e5e7dc}.wine-table{width:100%;border-collapse:collapse;min-width:980px}.wine-table th,.wine-table td{text-align:left;padding:12px 10px;border-bottom:1px solid #edf0e8;vertical-align:top}.wine-table th{background:#f0f3eb;font-size:13px;color:#4e5a50;position:sticky;top:0}.wine-table tbody tr{cursor:pointer}.wine-table tbody tr:hover{background:#f8faf4}.code{font-weight:900;color:#0f5b3f}.name{font-weight:850}.small{font-size:13px;color:#6b746b;line-height:1.45}.qty{font-weight:900}.qty.low{color:#b42318}.location{font-weight:800}.link{color:#116245;text-decoration:none;border-bottom:1px solid #11624555}.pill{display:inline-block;background:#edf1e8;color:#1d3f30;padding:5px 8px;border-radius:999px;font-size:12px;font-weight:800;margin:2px 4px 2px 0}
.card-list{display:none;gap:10px}.wine-card,.request-card,.log-card,.user-card{border:1px solid #e5e7dc;border-radius:15px;padding:13px;background:#fff;margin-bottom:10px}.wine-card{cursor:pointer}.wine-card:hover{background:#f8faf4}.wine-card .top{display:flex;justify-content:space-between;gap:10px}.detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.detail-item{background:#f7f9f2;border:1px solid #e6eadf;border-radius:13px;padding:11px;overflow-wrap:anywhere}.detail-item b{display:block;color:#687268;font-size:12px;margin-bottom:5px}.modal-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:14px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.form-grid label{display:block;font-weight:850}.form-grid input,.form-grid textarea,.form-grid select{margin-top:5px}.form-grid textarea{min-height:88px;resize:vertical}.form-grid .full{grid-column:1/-1}.upload-box{grid-column:1/-1;background:#f7f9f2;border:1px dashed #cad2bf;padding:12px;border-radius:13px}.diff{display:grid;grid-template-columns:1fr 1fr;gap:10px}.diff pre{white-space:pre-wrap;background:#f6f7fb;border-radius:10px;padding:10px;max-height:240px;overflow:auto}
.modal{position:fixed;inset:0;background:#0009;display:flex;align-items:flex-start;justify-content:center;padding:24px;z-index:100}.modal-card{background:#fff;border-radius:20px;max-width:960px;width:100%;max-height:92vh;overflow:auto;box-shadow:0 24px 80px #0005}.modal-head{position:sticky;top:0;background:#fff;border-bottom:1px solid #edf0e8;padding:15px 18px;display:flex;justify-content:space-between;align-items:center;gap:10px}.modal-head h2{margin:0;font-size:20px}.modal-body{padding:18px}.toast{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);background:#14231d;color:#fff;padding:13px 18px;border-radius:999px;z-index:200;box-shadow:0 14px 40px #0004}
@media(max-width:820px){.topbar{align-items:flex-start;flex-direction:column}.top-actions{justify-content:flex-start}.search-row{grid-template-columns:1fr}.wine-table{display:none}.table-wrap{display:none}.card-list{display:grid}.detail-grid,.form-grid,.diff{grid-template-columns:1fr}.filters select{max-width:none}.modal{padding:10px}.modal-card{max-height:95vh}.section-head{display:block}}


/* v3/v5 이미지 업로드/썸네일 보기 */
.thumb-wrap{margin-top:8px}.image-thumb-btn{border:0;background:transparent;padding:0;margin:0;border-radius:14px;cursor:pointer;display:inline-block;vertical-align:middle}.image-thumb-btn img{display:block;width:110px;height:74px;object-fit:cover;border:1px solid #dce3d6;border-radius:13px;box-shadow:0 8px 20px #00000012;background:#eef1e9}.image-thumb-btn:hover img{filter:brightness(.95);transform:scale(1.01)}.image-error{width:112px;height:74px;background:#f6e9e9;border:1px dashed #d9abab;border-radius:13px;position:relative}.image-error:after{content:'사진 오류';position:absolute;inset:0;display:grid;place-items:center;color:#9d1c1c;font-size:12px;font-weight:900}.wine-table .image-thumb-btn img{width:96px;height:64px}.card-thumb{margin:10px 0}.card-thumb .image-thumb-btn,.card-thumb .image-thumb-btn img{width:100%;max-width:440px;height:160px}.detail-image .image-thumb-btn img{width:260px;max-width:100%;height:170px}.image-preview{margin-top:10px}.image-preview .image-thumb-btn img{width:180px;height:120px}.image-viewer{text-align:center}.image-viewer img{max-width:100%;max-height:74vh;object-fit:contain;border-radius:16px;box-shadow:0 14px 42px #0002;background:#f5f5f5}.image-help{margin-top:10px}
@media(max-width:820px){.card-thumb .image-thumb-btn img{height:180px}.detail-image .image-thumb-btn img{width:100%;height:auto;max-height:55vh}.image-viewer img{max-height:70vh}.image-preview .image-thumb-btn img{width:100%;height:auto;max-height:240px}}

/* v4 다국어 선택 */
.lang-wrap{display:flex;align-items:center;gap:6px;background:#ffffff18;border:1px solid #ffffff22;border-radius:12px;padding:6px 8px;font-size:13px;font-weight:850}.lang-select{width:auto;min-width:118px;padding:8px 10px;border-radius:10px;border:0;background:#fff;color:#123a2b;font-weight:850}.top-actions .lang-wrap span{opacity:.9}.image-error:after{content:'IMG'}
@media(max-width:820px){.lang-wrap{width:100%;justify-content:space-between}.lang-select{flex:1}}


/* v5: 메인 화면 사진 표시 / 파일 업로드 전용 UI */
.location-cell{display:grid;gap:8px;min-width:118px}.thumb-wrap{margin-top:0}.image-thumb-btn{overflow:hidden}.image-thumb-btn.image-table img{width:118px;height:82px}.image-thumb-btn.image-card{width:100%;display:block}.image-thumb-btn.image-card img{width:100%;height:190px;object-fit:cover}.image-thumb-btn.image-preview img{width:100%;max-width:380px;height:220px;object-fit:cover}.image-thumb-btn.image-detail img{width:100%;max-width:520px;height:auto;max-height:55vh;object-fit:contain}.card-thumb{margin:12px 0 10px}.no-photo{display:grid;place-items:center;border:1px dashed #cdd6c5;background:#f7f9f2;color:#7a847a;border-radius:14px;font-weight:900;text-align:center}.no-photo-table{width:118px;height:82px;font-size:12px}.no-photo-card{width:100%;height:118px}.no-photo-preview{width:100%;max-width:380px;height:170px}.no-photo-detail{width:100%;max-width:520px;height:180px}.image-upload-box input[type=file]{background:#fff;margin-top:10px}.image-actions{margin-top:8px}.wine-card .top{align-items:flex-start}.wine-card .name{font-size:19px}.modal-card{overscroll-behavior:contain}.image-viewer img{width:auto;height:auto;max-width:100%;max-height:72vh}.image-viewer .modal-actions{justify-content:center}
@media(max-width:820px){.card-list{gap:14px}.wine-card{padding:14px;border-radius:18px}.image-thumb-btn.image-card img{height:220px}.no-photo-card{height:130px}.image-thumb-btn.image-preview img{height:auto;max-height:260px}.no-photo-preview{height:180px}.modal-card{border-radius:24px}.modal-body{padding:16px}.topbar{position:relative}.top-actions button,.top-actions .lang-wrap{font-size:15px}.wine-card .name{font-size:22px;line-height:1.18}.wine-card .code{font-size:24px}.wine-card .qty{font-size:20px}.image-viewer img{max-height:68vh}}

/* v6: 손님/관계자 입장 선택, 공개 와인메뉴, 내부정보 보호, 가격대 검색 */
.entry-screen{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(140deg,#123a2b,#1d5942 55%,#f6f7f3 55%)}.entry-card{width:min(760px,100%);background:#fff;border-radius:28px;padding:28px;box-shadow:0 28px 90px #0004}.entry-topline{letter-spacing:.18em;text-transform:uppercase;color:#718074;font-weight:900;font-size:13px}.entry-card h1{margin:8px 0 6px;font-size:34px;color:#123a2b}.entry-card p{margin:0 0 18px;color:#667069;font-size:17px}.entry-lang{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0 22px;padding:10px 12px;background:#f3f6ef;border:1px solid #e2e8dc;border-radius:15px;font-weight:900}.entry-choices{display:grid;grid-template-columns:1fr 1fr;gap:16px}.entry-choice{border:1px solid #dce4d7;border-radius:22px;background:#f8faf4;text-align:left;padding:22px;min-height:150px;transition:.15s box-shadow,.15s transform}.entry-choice:hover{box-shadow:0 16px 38px #00000018;transform:translateY(-1px)}.entry-choice b{display:block;font-size:25px;color:#123a2b;margin-bottom:10px}.entry-choice span{display:block;color:#667069;line-height:1.55;font-weight:650}.guest-choice{background:#fff}.staff-choice{background:#edf3ea}.price-filter{max-width:180px}.privacy-notice{margin:12px 0 0;color:#6b746b;background:#f7f9f2;border:1px dashed #cfd8c8;border-radius:12px;padding:10px 12px;font-size:13px}.price-cell,.price-card{font-weight:950;color:#123a2b;white-space:nowrap}.price-card{font-size:21px;text-align:right}.right-stack{display:grid;gap:6px;justify-items:end}.guest-card .top{align-items:flex-start}.customer-view .admin-grid,.customer-view #editorPanel,.customer-view #adminPanel{display:none!important}.customer-view .wine-card{border-color:#e1e7dc}.internal-view .privacy-notice{display:none}.wine-table th:last-child,.wine-table td:last-child{white-space:nowrap}.entry-screen.hidden{display:none!important}
@media(max-width:820px){.entry-screen{padding:16px;background:#123a2b}.entry-card{padding:22px;border-radius:24px}.entry-card h1{font-size:31px}.entry-choices{grid-template-columns:1fr}.entry-choice{min-height:126px}.price-filter{max-width:none}.price-card{font-size:22px}.filters{display:grid;grid-template-columns:1fr 1fr}.filters select,.filters input,.filters button{max-width:none;width:100%}.search-panel .filters button{grid-column:1/-1}}
@media(max-width:460px){.filters{grid-template-columns:1fr}.entry-card h1{font-size:28px}.entry-choice b{font-size:23px}}
