.gq-style-dialog {
 width: min(680px, calc(100% - 28px));
 max-width: calc(100dvw - 28px);
 max-height: 88dvh;
 box-sizing: border-box;
 overflow: auto;
 padding: clamp(16px, 4vw, 30px);
 border: 1px solid #4a7484;
 border-radius: 20px;
 background: #102538;
 color: #eff9ff;
}
.gq-style-dialog::backdrop { background: #050e19c9; }
.gq-style-dialog header,
.gq-style-preview { display: flex; align-items: center; gap: 14px; }
.gq-style-dialog header { justify-content: space-between; }
.gq-style-dialog header h2 { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.gq-style-dialog header > button { flex: none; min-width: 44px; min-height: 44px; white-space: nowrap; }
.gq-style-preview {
 margin-block: 15px;
 padding: 14px;
 border: 1px solid #34566c;
 border-radius: 14px;
 background: #0a1b2a;
}
.gq-style-preview > div { min-width: 0; overflow-wrap: anywhere; }
#gq-style-equipped:lang(ko) { word-break: keep-all; }
.gq-style-portrait {
 display: inline-grid;
 flex: none;
 place-items: center;
 width: 62px;
 aspect-ratio: 1;
 border: 4px solid #7799a9;
 border-radius: 50%;
 background: #1a384e;
 color: white;
 font-size: 30px;
 line-height: 1;
}
.gq-style-preview .gq-style-portrait { width: 82px; font-size: 40px; }
.gq-style-export-option { display: flex; align-items: center; gap: 6px; margin-block: 6px; }
.gq-style-export-option input { width: 18px; height: 18px; margin: 0; }
#gqShellProfileStyle { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; }
#gqShellProfileStyle .gq-style-portrait { width: 30px; border-width: 2px; }
#gqShellProfileStyle .gq-style-portrait[data-frame="compass"] { border-width: 3px; }
.gq-style-avatar {
 display: block;
 width: 100%;
 aspect-ratio: 1;
 border-radius: 50%;
 background-image: url('geoquiz-characters-2.webp');
 background-repeat: no-repeat;
}
.gq-style-portrait[data-frame="compass"] { border: 5px double #f1ca74; }
.gq-style-portrait[data-frame="contour"] { border: 4px solid #78d6a8; box-shadow: inset 0 0 0 3px #235f55; }
.gq-style-portrait[data-frame="aurora"] {
 border: 4px solid transparent;
 background: linear-gradient(#1a384e, #1a384e) padding-box,
             linear-gradient(140deg, #86edce, #85a3ff, #f3a5e1) border-box;
}
.gq-style-items {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 10px;
}
.gq-style-item {
 display: grid;
 justify-items: center;
 align-content: start;
 gap: 8px;
 padding: 12px 8px;
 text-align: center;
 border: 1px solid #34566c;
 border-radius: 12px;
}
.gq-style-item > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.gq-style-dialog button {
 min-height: 42px;
 padding: 7px 10px;
 border: 1px solid #8bc7b9;
 border-radius: 8px;
 background: #184653;
 color: #f3fcff;
 cursor: pointer;
}
.gq-style-dialog button:disabled { opacity: .56; cursor: default; }
#gq-style-balance { color: #ffdb83; font-weight: 700; }
.gq-style-sections { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 12px; }
.gq-style-sections button { flex: 1 0 auto; }
.gq-style-result-shortcut { min-height: 40px; margin-inline-start: 10px; }
.gq-result-image-display { min-height: 220px; display: grid; place-items: center; }
.gq-result-image-display canvas { display: block; max-width: 100%; max-height: 54dvh; height: auto; width: auto; border-radius: 10px; }
.gq-result-image-dialog button[aria-pressed="true"] { border-color: #ffdb83; box-shadow: inset 0 0 0 1px #ffdb83; }
.gq-style-result .gq-style-portrait { width: 34px; border-width: 3px; margin-inline-end: 8px; vertical-align: middle; }
.gq-style-dialog h3,
#gq-wardrobe summary { scroll-margin-block-start: 12px; }
#gq-wardrobe { margin-block: 12px; }
#gq-wardrobe summary { cursor: pointer; padding-block: 8px; }
.gq-style-dialog .gq-style-item[hidden] { display: none; }
.gq-outfit-filters { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 12px 0; }
.gq-outfit-filters select { margin-inline-start: 8px; }
#gq-wardrobe .gq-outfit-filters[hidden],
#gq-wardrobe .gq-outfit-stage[hidden],
#gq-wardrobe .gq-style-items[hidden] { display: none; }
.gq-favorite-portrait { position: absolute; inset: 0; display: grid; place-items: center; }
.gq-favorite-portrait[hidden] { display: none; }
.gq-favorite-portrait .gq-style-portrait { width: 132px; }
.gq-outfit-saved-contents { flex-basis: 100%; }
#gq-wardrobe .gq-outfit-saved-contents[hidden] { display: none; }
#gq-wardrobe button[aria-pressed="true"] { border-color: #ffdb83; box-shadow: inset 0 0 0 1px #ffdb83; }
.gq-outfit-stage {
 position: relative;
 width: min(100%, 224px);
 height: 284px;
 margin: 8px auto 14px;
 border-radius: 20px;
 background: #fdf6e7;
 overflow: hidden;
}
.gq-outfit-art {
 position: absolute;
 inset: 12px 0;
 width: 140px;
 margin: auto;
 background: url('geoquiz-explorer-preview.webp') no-repeat 21.5% center / auto 100%;
}
.gq-outfit-stage[data-character="lia"] .gq-outfit-art { background-position: 78% center; }
.gq-outfit-art span {
 position: absolute;
 inset: 0;
 display: none;
 background: inherit;
}
.gq-outfit-stage[data-hat="trail-hat"] .gq-outfit-hat {
 display: block;
 clip-path: polygon(16% 0,85% 0,88% 21%,78% 24%,75% 15%,29% 14%,24% 24%,11% 22%);
 filter: hue-rotate(44deg) saturate(.8);
}
.gq-outfit-stage:is([data-hat="captain-hat"],[data-hat="ranger-hat"]) .gq-outfit-art::before {
 content: '';
 position: absolute;
 z-index: 1;
 inset: 0;
 background: #fdf6e7;
 clip-path: polygon(0 0,100% 0,100% 25%,74% 25%,74% 16%,26% 16%,26% 25%,0 25%);
}
.gq-outfit-stage:is([data-hat="captain-hat"],[data-hat="ranger-hat"]) .gq-outfit-hat {
 display: block;
 z-index: 2;
 inset: 3px 12px auto;
 height: 43px;
 box-sizing: border-box;
 border: 3px solid #241d1b;
 border-radius: 46% 46% 24% 24%;
 background: linear-gradient(#fffbec,#d7e6e9 73%,#172f4a 75%);
 transform: rotate(-4deg);
}
.gq-outfit-stage:is([data-hat="captain-hat"],[data-hat="ranger-hat"]) .gq-outfit-hat::before {
 content: '';
 position: absolute;
 bottom: -7px;
 left: 10%;
 right: 8%;
 height: 12px;
 border: 2px solid #241d1b;
 border-radius: 34% 52% 42% 32%;
 background: linear-gradient(#dfb665 0 35%,#153251 42%);
}
.gq-outfit-stage[data-hat="captain-hat"] .gq-outfit-hat::after {
 content: '⚓';
 position: absolute;
 top: 3px;
 left: calc(50% - 10px);
 width: 20px;
 text-align: center;
 font-size: 14px;
 color: #173958;
}
.gq-outfit-stage[data-hat="ranger-hat"] .gq-outfit-hat {
 inset: 4px 26px auto;
 height: 35px;
 border-radius: 24% 25% 17% 17%;
 background: linear-gradient(#b6c391,#6e8054 70%,#523a30 74%);
 transform: rotate(3deg);
}
.gq-outfit-stage[data-hat="ranger-hat"] .gq-outfit-hat::before {
 left: -25%;
 right: -25%;
 bottom: -10px;
 height: 15px;
 border-radius: 52% 41% 36% 44%;
 background: linear-gradient(#aab67c,#71804e);
}
.gq-outfit-stage[data-top="trail-top"] .gq-outfit-top {
 display: block;
 clip-path: polygon(35% 32%,62% 32%,75% 36%,87% 51%,77% 54%,71% 50%,74% 63%,25% 63%,26% 51%,21% 54%,13% 50%,24% 37%);
 filter: hue-rotate(125deg) saturate(.73);
}
.gq-outfit-stage[data-bottom="trail-bottom"] .gq-outfit-bottom {
 display: block;
 clip-path: polygon(29% 63%,70% 63%,78% 83%,72% 85%,56% 85%,50% 68%,45% 85%,23% 85%,23% 76%);
 filter: hue-rotate(-35deg) contrast(1.08);
}
.gq-outfit-stage[data-shoes="trail-shoes"] .gq-outfit-shoes {
 display: block;
 clip-path: polygon(17% 85%,45% 85%,45% 100%,17% 100%,17% 85%,54% 85%,81% 85%,81% 100%,54% 100%,54% 85%);
 filter: hue-rotate(-25deg) saturate(1.4);
}
.gq-outfit-stage[data-gloves="trail-gloves"] .gq-outfit-gloves {
 display: block;
 clip-path: polygon(6% 56%,23% 56%,25% 69%,7% 70%,6% 56%,76% 56%,91% 56%,94% 70%,77% 70%,76% 56%);
 filter: hue-rotate(145deg) saturate(1.4);
}
.gq-outfit-stage[data-top="survey-vest"] .gq-outfit-top,
.gq-outfit-stage[data-bottom="field-shorts"] .gq-outfit-bottom,
.gq-outfit-stage[data-shoes="snow-boots"] .gq-outfit-shoes,
.gq-outfit-stage[data-gloves="snow-mittens"] .gq-outfit-gloves {
 display: block;
 background-image: url('geoquiz-explorer-outfits.webp');
}
.gq-outfit-stage[data-top="survey-vest"] .gq-outfit-top {
 z-index: 1;
 clip-path: polygon(32% 31%,68% 31%,81% 38%,87% 53%,76% 55%,70% 52%,75% 63%,25% 63%,29% 52%,22% 55%,12% 53%,18% 38%);
}
.gq-outfit-stage[data-bottom="field-shorts"] .gq-outfit-bottom {
 clip-path: polygon(22% 62%,40% 62%,44% 57%,57% 57%,60% 62%,76% 62%,83% 85%,55% 85%,50% 77%,44% 85%,18% 85%);
}
.gq-outfit-stage[data-shoes="snow-boots"] .gq-outfit-shoes {
 clip-path: polygon(16% 82%,84% 82%,84% 100%,16% 100%);
}
.gq-outfit-stage[data-gloves="snow-mittens"] .gq-outfit-gloves {
 z-index: 1;
 clip-path: polygon(0 55.7%,25% 55.7%,25% 70%,0 70%,0 55.7%,75% 55.7%,100% 55.7%,100% 70%,75% 70%,75% 55.7%);
}
.gq-outfit-stage[data-scene="scene-wood"] {
 border: 6px ridge #a56d3f;
 box-sizing: content-box;
}
.gq-outfit-stage[data-scene="scene-stars"] {
 border: 6px double #a597db;
 box-sizing: content-box;
 background: radial-gradient(circle at 9% 16%,#a788d1 0 2px,transparent 3px),
             radial-gradient(circle at 91% 30%,#c8a260 0 3px,transparent 4px),
             radial-gradient(circle at 11% 68%,#c8a260 0 2px,transparent 3px),
             radial-gradient(circle at 86% 76%,#a788d1 0 2px,transparent 3px),
             #fdf6e7;
 box-shadow: inset 0 0 16px #b3a5df65;
}
.gq-outfit-stage .gq-outfit-pet { display: none; }
.gq-outfit-stage[data-pet] .gq-outfit-pet {
 display: block;
 position: absolute;
 z-index: 4;
 right: 6px;
 bottom: 12px;
 width: 43px;
 height: 43px;
 border-radius: 50%;
 background: #fff2ca url('geoquiz-outfit-reference-3.webp') no-repeat 2.8% 84%;
 background-size: 1300% 1025%;
 box-shadow: 0 0 0 2px #fce0a3;
}
.gq-outfit-stage[data-pet="pet-owl"] .gq-outfit-pet { background-position: 21.3% 82%; }
@media (min-width: 560px) {
 .gq-style-items { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
