:root{--primary:#146b54;--background:#f3f8f3;--font:system-ui;--spacing:16px;--width:1000px}*{box-sizing:border-box}body{margin:0;background:var(--background);font-family:var(--font);color:#18312b}header{display:flex;align-items:center;justify-content:space-between;padding:16px max(16px,calc((100vw - var(--width))/2));background:var(--primary);color:white}header button{margin-left:8px}main{max-width:var(--width);padding:20px;margin:auto}.hero{padding:25px;background:#e0efe6;border-radius:20px}.hero img{max-height:200px;max-width:100%}section{margin-bottom:24px}h1{margin:4px 0}.row,form{display:flex;flex-wrap:wrap;gap:10px;align-items:center}input,textarea,select,button{font:inherit;padding:11px;border:1px solid #a6b8ad;border-radius:9px}input,textarea{max-width:100%;min-width:180px}textarea{width:100%}button{cursor:pointer;background:var(--primary);color:white;border:0}button:disabled{opacity:.5;cursor:not-allowed}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:var(--spacing);margin-top:15px}.card{background:white;border-radius:14px;padding:18px;box-shadow:0 2px 8px #174b3a20;overflow-wrap:anywhere}.card img{max-width:100%;max-height:130px;border-radius:8px}.card button{margin:4px}.hint,small{color:#53645c}.notice{padding:12px;background:#fff4d9;border-radius:8px}dialog{max-width:440px;width:90%;border:0;border-radius:15px;padding:22px;box-shadow:0 10px 50px #0005}dialog::backdrop{background:#0009}#flash{color:#b22;min-height:22px}#auth form{margin:10px 0}a{color:var(--primary)}@media(max-width:600px){header{padding:12px}main{padding:12px}.row>*{flex:1 1 140px}}
.avatar{width:96px;height:96px;border-radius:50%;object-fit:cover;background:#d9e6df}.upload-label{display:inline-block;cursor:pointer;background:var(--primary);color:white;border-radius:9px;padding:11px}.sample{position:relative}.sample img{width:100%;height:180px;object-fit:cover;cursor:pointer}.sample .row{gap:5px}.sample button{font-size:.9rem}.crop-area{width:min(76vw,320px);height:min(76vw,320px);overflow:hidden;border-radius:12px;background:#ddd;touch-action:none;position:relative}.crop-area img{position:absolute;max-width:none;max-height:none;user-select:none;pointer-events:none}#gallery-dialog{max-width:min(95vw,800px);text-align:center}#gallery-large{max-width:100%;max-height:68vh;display:block;margin:10px auto}.stars{color:#a46b00;font-size:1.1rem}.rating-form-row{display:flex;align-items:center;gap:10px;margin:8px 0}.rating-form-row select{margin-left:auto}.review-entry{border-top:1px solid #ccd;padding:10px 0}

.dashboard-nav{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.dashboard-nav[hidden],#tailor-dashboard[hidden]{display:none}.dashboard-nav button[aria-current=page]{outline:3px solid #b7dfc6}#tailor-dashboard .card{min-height:160px}#tailor-dashboard .card p{min-height:35px}


/* Compact dashboard layout; the authenticated tools retain their existing behavior. */
#app{max-width:900px;margin:auto}
#app>#welcome{margin:4px 0 10px;color:#52665a;font-size:.92rem}
#app h2{font-size:1.32rem;line-height:1.25;margin:0 0 14px;letter-spacing:-.02em}
#app h3{font-size:1rem;line-height:1.3;margin:0 0 5px}
#app section{margin-bottom:16px}
#customer-dashboard .cards,#tailor-dashboard .cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0}
#customer-dashboard .card,#tailor-dashboard .card{min-height:0;padding:16px;border:1px solid #e2ebe5;border-radius:12px;box-shadow:none;display:flex;flex-direction:column;align-items:flex-start}
#customer-dashboard .card p,#tailor-dashboard .card p{min-height:0;margin:4px 0;color:#566a5e;font-size:.9rem}
#customer-dashboard .card button,#tailor-dashboard .card button{margin:auto 0 0;padding:8px 12px;font-size:.9rem}
#tailor-dashboard .card{min-height:0}
.mode-control{display:flex;align-items:center;gap:10px;padding:10px 14px;margin:0 0 16px;border:1px solid #dce9e0;border-radius:12px;box-shadow:none}
.mode-control strong{margin-right:auto;font-size:.9rem;color:var(--primary)}
.mode-control label{font-size:.88rem;color:#52665a}
.mode-control select{padding:7px 28px 7px 9px;background:white;min-width:112px}
.dashboard-nav{gap:6px;margin:0 0 16px}
.dashboard-nav button{padding:8px 12px;font-size:.9rem;background:#e5f0e9;color:#245240}
.dashboard-nav button[aria-current=page]{background:var(--primary);color:#fff;outline:0}
#app button{transition:background-color .15s ease}
#app button:focus-visible,#app select:focus-visible{outline:3px solid #7fc49b;outline-offset:2px}
#flash:empty{min-height:0}
@media(max-width:600px){
 main{padding:12px 14px}
 #customer-dashboard .cards,#tailor-dashboard .cards{grid-template-columns:1fr}
 #customer-dashboard .card,#tailor-dashboard .card{padding:13px 15px}
 #customer-dashboard .card button,#tailor-dashboard .card button{margin-top:8px}
 .mode-control{gap:6px;flex-wrap:wrap}
 .mode-control label{width:100%;order:3}
 .mode-control select{min-width:110px}
 .dashboard-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .dashboard-nav button{margin:0}
}

header .home-link{color:white;display:inline-block;margin-right:12px;text-decoration:underline;text-underline-offset:4px;font-weight:650}header .home-link:focus-visible{outline:2px solid white;outline-offset:3px}


.site-header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:62px;padding:9px max(14px,calc((100vw - 1000px)/2));background:#185e45;color:white}.site-brand{display:inline-flex;align-items:center;gap:7px;color:white;text-decoration:none;font-size:1.25rem;white-space:nowrap}.site-actions{position:relative;display:flex;align-items:center;gap:8px;margin:0;flex-wrap:nowrap}.message-link{display:inline-flex;align-items:center;gap:5px;color:white!important;text-decoration:none!important;font-weight:750;white-space:nowrap;padding:7px 4px}.message-link>span:first-child{font-size:1.35rem}.menu-toggle{color:white;background:transparent;border:1px solid #ffffff80;border-radius:9px;font-size:1.3rem;line-height:1;padding:7px 10px;margin:0;min-width:42px}.site-menu{position:absolute;z-index:20;right:0;top:calc(100% + 9px);width:min(250px,calc(100vw - 25px));background:white;color:#19352a;box-shadow:0 10px 28px #0004;border-radius:12px;padding:7px;display:grid;gap:2px}.site-menu[hidden],.unread-badge[hidden]{display:none!important}.site-menu a,.site-menu button{display:block;width:100%;text-align:left;background:transparent;color:#19352a!important;text-decoration:none;border:0;border-radius:7px;margin:0;padding:11px;font:inherit}.site-menu a:hover,.site-menu button:hover{background:#e7f3eb}.unread-badge{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 5px;border-radius:50px;background:#e51b37;color:white;font-size:.75rem;font-weight:800;line-height:1}.card-action{display:inline-flex;align-items:center;gap:7px;margin-top:8px;padding:9px 12px;border-radius:9px;background:#185e45;color:white!important;text-decoration:none;font-weight:650}.site-header a:focus-visible,.site-header button:focus-visible{outline:2px solid white;outline-offset:2px}body{overflow-x:hidden}main{min-width:0}@media(max-width:390px){.site-header{padding:9px 10px}.site-brand{font-size:1.08rem}.site-actions{gap:3px}.message-label{font-size:.84rem}.message-link{gap:3px}}

#customer-dashboard .card:first-child{grid-column:1/-1;background:#e4f3e9}#customer-profile-summary{display:flex;align-items:center;gap:8px}#customer-profile-summary .avatar{width:38px;height:38px}#customer-recent-chats a,#customer-favorite-summary a{display:inline-block;margin:5px 5px 3px 0}.mode-control{justify-content:flex-end}.mode-control label{margin-right:auto}.mode-control select{flex:none}@media(max-width:600px){.mode-control{flex-wrap:nowrap}.mode-control label{width:auto;order:0}.mode-control select{min-width:100px}#customer-dashboard .card:first-child{grid-column:auto}}

[hidden]{display:none!important}

#results{display:grid;grid-template-columns:1fr;gap:16px;max-width:760px;margin:14px auto}
#results .search-tailor{padding:0;overflow:hidden;border-radius:18px;box-shadow:0 4px 22px #153b2c18}
.search-tailor-image{display:block;overflow:hidden;background:#dce8dd}
.search-tailor-image img{display:block;width:100%;height:auto;max-height:none;aspect-ratio:4/3;object-fit:cover;border-radius:0}
.search-tailor-body{padding:15px 17px 18px}
.search-tailor-body h3{font-size:1.2rem;margin:0 0 5px}
.search-tailor-body h3 a{color:#19352a;text-decoration:none}
.search-tailor-body p{margin:5px 0;font-size:.94rem}
.search-tailor-rating{color:#805b18}
.search-tailor-samples{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}
.search-tailor-samples img{width:100%;height:auto;max-height:none;aspect-ratio:1;object-fit:cover;border-radius:9px}
.search-tailor-actions{display:flex;align-items:center;gap:9px;margin-top:12px;flex-wrap:wrap}
.search-tailor-actions button{margin:0;padding:9px 13px}
#find>.row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;align-items:stretch}
#find>.row>#query,#find>.row>#area{grid-column:1/-1;width:100%}
#find>.row>*{min-width:0;margin:0}
.search-radius{display:flex;align-items:center;gap:8px;min-width:0}
.search-radius select{width:100%;min-width:0}
#find>.row>button{width:100%;white-space:normal}
@media(max-width:430px){.search-tailor-body{padding:13px 14px 16px}#find>.row{gap:8px}.search-tailor-samples{gap:6px}}

.search-tailor-action{display:inline-flex;align-items:center;justify-content:center;background:#185e45;color:white!important;text-decoration:none;border-radius:9px;padding:9px 13px;font-weight:650}

#customer-dashboard .message-heading,#tailor-dashboard .message-heading{font-weight:800;display:flex;align-items:center;gap:8px;font-size:1.2rem;margin:0 0 12px}
#customer-dashboard .message-heading span,#tailor-dashboard .message-heading span{font-size:1.45rem}
#customer-dashboard .card:first-child,#tailor-dashboard .card:first-child{grid-column:1/-1;background:#e4f3e9}
#tailor-dashboard .card{min-height:0}

.auth-card{max-width:520px;margin:20px auto;padding:clamp(18px,4vw,30px);border-radius:16px;background:#fff;box-shadow:0 2px 12px #174b3a20}
.auth-card h2{margin:0 0 18px}
.auth-choices,.auth-card form{display:flex;flex-direction:column;align-items:stretch;gap:9px}
.auth-choices button,.auth-card form input,.auth-card form select,.auth-card form button{display:block;width:100%;min-width:0}
.auth-card form label{font-weight:650}
.auth-card form button,.auth-choices button{min-height:48px;font-weight:700}
.auth-choices .auth-secondary{border:2px solid var(--primary);background:white;color:var(--primary)}
.auth-note{font-size:.88rem;color:#53645c}
.auth-text-link{background:transparent;color:var(--primary);padding:8px 0;text-decoration:underline;text-align:left}
.auth-card [hidden]{display:none!important}
.auth-card details{margin:18px 0}
