/* V2 configurator only. Shared navigation, V1 templates and style.css stay intact. */
body.hicoria-v2-order { background-color: #141715; }
body.hicoria-v2-order .wrap, body:has(#v2-order) .wrap { width: 100%; max-width: none; }
#v2-order { max-width: 1480px; margin: 32px auto 64px; padding: 0 24px; color: #eff3ed; font: 16px/1.45 gidol, Arial, sans-serif; }
#v2-order *, #v2-order *::before, #v2-order *::after { box-sizing: border-box; }
#v2-order h1, #v2-order h2, #v2-order h3, #v2-order p { margin: 0; }
#v2-order h1 { font: 38px/1.1 bbn, sans-serif; text-transform: uppercase; color: #fff; }
#v2-order h2 { font: 28px/1.2 bbn, sans-serif; color: #fff; margin-bottom: 18px; }
#v2-order h3 { font: 23px/1.2 bbn, sans-serif; color: #f4f7f0; }
#v2-order a { color: #a4d74d; }
#v2-order a:hover { font-size: inherit; }
#v2-order button, #v2-order input, #v2-order select, #v2-order textarea { font-family: inherit; }
#v2-order [hidden] { display: none !important; }
#v2-order .v2-order-heading { display: flex; align-items: center; gap: 24px; margin-bottom: 28px; }
#v2-order .v2-order-heading img { width: 64px; height: 64px; object-fit: contain; }
#v2-order .v2-order-heading p:last-child { color: #d0d8ce; margin-top: 9px; }
#v2-order .v2-order-eyebrow { color: #a4d74d; font-weight: bold; letter-spacing: .06em; margin-bottom: 5px; }
#v2-order .v2-order-card { padding: 24px; background: rgba(20,27,22,.94); border: 1px solid #64715e; border-radius: 8px; min-width: 0; }
#v2-order .v2-order-categories { padding: 0; margin-bottom: 20px; background: none; border: 0; }
#v2-order .v2-order-categories h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#v2-order .v2-category-grid { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 9px; }
#v2-order .v2-category-grid button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 104px; border: 1px solid #68735f; border-radius: 8px; background: rgba(24,31,26,.94); color: #f7f8f5; font: 22px/1.1 bbn,sans-serif; cursor: pointer; }
#v2-order button img { object-fit: contain; flex-shrink: 0; }
#v2-order .v2-category-grid img { width: 38px; height: 38px; }
#v2-order [data-order-category=builtin] img { filter: invert(.65); }
#v2-order .v2-category-grid button:hover { border-color: #a4d74d; }
#v2-order .v2-category-grid button.is-selected { color: #b1ed50; background: #16220d; border: 2px solid #a4d74d; box-shadow: 0 0 0 2px #37521e; }
#v2-order .v2-category-grid button.is-selected::after { content: '\2713'; position: absolute; right: 7px; top: -7px; width: 25px; height: 25px; border-radius: 50%; background: #a4d74d; color: #18200d; font: bold 18px/25px Arial,sans-serif; }
#v2-order .v2-order-grid { display: grid; grid-template-columns: minmax(0,1fr) 345px; gap: 18px; align-items: start; }
#v2-order .v2-order-fields { display: grid; gap: 18px; min-width: 0; }
#v2-order .v2-step { color: #a4d74d; margin-right: 7px; }
#v2-order .v2-installation-grid, #v2-order .v2-version-grid, #v2-order .v2-project-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
#v2-order .v2-installation-grid button { display: flex; align-items: center; gap: 15px; min-width: 0; min-height: 106px; padding: 18px; border: 1px solid #63715a; border-radius: 6px; background: #192219; color: #f1f5ec; text-align: left; cursor: pointer; font-size: 16px; }
#v2-order .v2-installation-grid strong { font-size: 18px; }
#v2-order .v2-installation-grid small { display: block; font-size: 14px; color: #bccab5; margin-top: 5px; }
#v2-order .v2-installation-grid button.is-selected { background: #24361c; border-color: #a4d74d; box-shadow: inset 0 0 0 1px #a4d74d; }
#v2-order .v2-order-runtime-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 22px; }
#v2-order .v2-order-field { min-width: 0; }
#v2-order .v2-order-field > label { display: block; font-weight: bold; font-size: 16px; margin-bottom: 7px; color: #e3eadf; }
#v2-order input[type=text], #v2-order select, #v2-order textarea { width: 100%; max-width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 10px 12px; color: #f5f8ef; background: #101711; border: 1px solid #9aa792; border-radius: 5px; font-size: 16px; box-shadow: none; }
#v2-order select option { background: #111912; color: #fff; }
#v2-order textarea { min-height: 90px; resize: vertical; font: 14px/1.55 monospace; }
#v2-order input::placeholder { color: #aab6a1; }
#v2-order button:focus-visible, #v2-order input:focus-visible, #v2-order select:focus-visible, #v2-order textarea:focus-visible, #v2-order a:focus-visible { outline: 3px solid #b5ec76; outline-offset: 3px; }
#v2-order .v2-jvm-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 9px; }
#v2-order .v2-jvm-heading button { background: transparent; color: #b2e579; border: 1px solid #7ca057; border-radius: 4px; padding: 7px 10px; cursor: pointer; }
#v2-order .v2-order-readonly { min-height: 44px; padding: 10px; background: #111a11; border: 1px solid #66765e; border-radius: 5px; }
#v2-order .v2-order-hint { color: #bdcbb7; font-size: 14px; margin-top: 10px; }
#v2-order .v2-order-notice { padding: 15px; margin-top: 18px; background: #1d2b19; border: 1px solid #607b42; border-radius: 5px; line-height: 1.5; }
#v2-order .v2-ram-advice { font-size: 16px; border-left: 4px solid #a4d74d; }
#v2-order .v2-ram-advice[data-advice-state=below] { border-color: #c6aa58; background: #292719; }
#v2-order .v2-resource-row { padding: 18px 0; border-bottom: 1px solid #45513e; }
#v2-order .v2-resource-row .v2-order-field { display: grid; grid-template-columns: 82px minmax(0,1fr) 126px; gap: 16px; align-items: center; }
#v2-order .v2-resource-row label { margin: 0; }
#v2-order .v2-resource-slider { width: 100%; min-width: 0; padding: 0; height: 30px; accent-color: #a4d74d; cursor: pointer; }
#v2-order .v2-resource-stepper { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 4px 7px; border: 1px solid #95a38b; border-radius: 5px; background: #101711; }
#v2-order .v2-resource-stepper button { padding: 5px; border: 0; background: transparent; color: #f0f6e9; cursor: pointer; font-size: 22px; }
#v2-order .v2-resource-slider-value { font-size: 16px; font-weight: bold; text-align: center; }
#v2-order .v2-order-period { max-width: 340px; margin-top: 20px; }
#v2-order .v2-order-checkbox { display: flex; align-items: center; gap: 10px; margin: 20px 0 0; color: #c7d1bf; font-size: 14px; }
#v2-order .v2-order-checkbox input { appearance: auto; width: 18px; height: 18px; margin: 0; accent-color: #a4d74d; }
#v2-order .v2-order-summary { position: sticky; top: 22px; border-top: 3px solid #a4d74d; }
#v2-order .v2-order-summary h2 { font-size: 30px; margin: 12px 0 5px; }
#v2-order .v2-order-recap { border-top: 1px solid #4a583f; padding-top: 5px; margin-top: 20px; }
#v2-order .v2-order-recap > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #34412f; }
#v2-order dt { font-weight: normal; color: #c4cfbd; }
#v2-order dd { margin: 0; max-width: 66%; overflow-wrap: anywhere; text-align: right; font-weight: bold; }
#v2-order .v2-order-price { margin-top: 25px; }
#v2-order .v2-order-price strong { color: #a4d74d; font: 48px/1.2 bbn,sans-serif; }
#v2-order .v2-order-saving { color: #badc92; font-size: 14px; }
#v2-order .v2-order-submit { display: block; width: 100%; min-height: 50px; margin: 23px 0 0; padding: 13px; border: 1px solid #a4d74d; border-radius: 5px; background: #8bc33c; color: #142008; font-size: 17px; font-weight: bold; cursor: pointer; white-space: normal; }
#v2-order .v2-order-submit:hover { background: #a4d74d; }
#v2-order .v2-order-submit:disabled { background: #484c46; color: #c5c9c1; border-color: #6c7266; cursor: not-allowed; }
#v2-order .v2-order-next { text-align: center; line-height: 1.5; }
#v2-order .v2-order-promises { margin: 22px 0 0; padding: 16px 0 0; border-top: 1px solid #4a583f; list-style: none; font-size: 14px; }
#v2-order .v2-order-promises li { padding: 5px 0; }
#v2-order .v2-order-promises li::before { content: '\2713'; color: #a4d74d; margin-right: 10px; font-weight: bold; }
#v2-order .v2-order-errors, #v2-order .v2-catalog-error { padding: 15px; background: #34241d; color: #ffe4cc; border: 1px solid #b9824a; border-radius: 5px; margin-bottom: 18px; }
#v2-order .v2-order-errors p + p { margin-top: 7px; }
#v2-order .v2-catalog-explanation { font-size: 15px; color: #d6e0cf; margin-bottom: 20px; }
#v2-order .v2-catalog-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; margin: 20px 0 9px; }
#v2-order .v2-catalog-heading > span, #v2-order .v2-catalog-note { color: #b2c0a8; font-size: 13px; }
#v2-order .v2-catalog-note { margin-bottom: 14px; }
#v2-order .v2-project-card { display: flex; align-items: flex-start; gap: 14px; min-width: 0; padding: 15px; border: 1px solid #52614a; border-radius: 6px; background: #192118; color: #f2f5ee; text-decoration: none; }
#v2-order .v2-project-card:hover { border-color: #a4d74d; background: #23321b; }
#v2-order .v2-project-card > img { object-fit: contain; border-radius: 7px; flex-shrink: 0; margin-top: 2px; }
#v2-order .v2-project-copy { display: block; min-width: 0; overflow-wrap: anywhere; }
#v2-order .v2-project-copy > strong { display: block; font: 21px/1.15 bbn,sans-serif; color: #fff; margin-bottom: 5px; }
#v2-order .v2-project-description { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #d3dfc9; font-size: 14px; line-height: 1.35; }
#v2-order .v2-project-meta { display: block; font-size: 12px; color: #b8c9ac; margin-top: 7px; }
#v2-order .v2-project-action { display: block; color: #b5e875; font-size: 14px; font-weight: bold; margin-top: 6px; }
#v2-order .v2-catalog-search { margin: 25px 0 18px; padding-top: 20px; border-top: 1px solid #4e5c43; }
#v2-order .v2-catalog-search h3 { margin-bottom: 12px; }
#v2-order .v2-catalog-search form > div { display: flex; gap: 12px; flex-wrap: wrap; }
#v2-order .v2-catalog-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#v2-order .v2-catalog-search input[type=text] { flex: 1; min-width: 170px; }
#v2-order .v2-installation-picker input[type=submit], #v2-order [name=select_installation] { min-height: 44px; padding: 10px 20px; background: #26391a; color: #c3ed91; border: 1px solid #8fb85f; border-radius: 5px; font-size: 16px; cursor: pointer; }
#v2-order .v2-installation-picker input[type=submit]:disabled { opacity: .5; cursor: not-allowed; }
#v2-order .v2-catalog-pagination { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
#v2-order .v2-project-detail > header { display: flex; align-items: center; gap: 16px; margin: 22px 0 15px; }
#v2-order .v2-project-detail > header img { border-radius: 8px; object-fit: contain; }
#v2-order .v2-project-detail > p { color: #d2dfca; margin-bottom: 18px; }
#v2-order .v2-version-card { display: grid; gap: 5px; padding: 17px; color: #f5f8f0; border: 1px solid #697c5c; border-radius: 6px; text-decoration: none; }
#v2-order .v2-version-card strong { font-size: 18px; overflow-wrap: anywhere; }
#v2-order .v2-version-card span, #v2-order .v2-version-card small { font-size: 14px; color: #c7d9ba; }
#v2-order .v2-version-card.is-selected { border-color: #a4d74d; background: #263a1b; }
#v2-order .v2-channel { font-size: 12px; border: 1px solid #70835c; border-radius: 3px; padding: 1px 5px; }
#v2-order .v2-selected-version { padding: 16px; margin: 20px 0 14px; border: 1px solid #7c9d57; border-radius: 5px; background: #23351a; }
#v2-order .v2-preparation-progress { padding: 12px 16px; margin: 14px 0; border: 1px solid #c39a71; border-radius: 5px; background: #634831; color: #fff; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
#v2-order .v2-preparation-progress[data-picker-ready-message] { border-color: #7c9d57; background: #23351a; }
/* Shared legacy paragraph padding must not turn a short notice into a full card. */
#v2-order .v2-preparation-progress p { padding: 0; margin: 0; color: inherit; font-size: inherit; line-height: inherit; }
#v2-order.is-enhanced [data-order-plain-configuration], #v2-order.is-enhanced .v2-version-native { display: none; }
#v2-order:not(.is-enhanced) .v2-order-categories, #v2-order:not(.is-enhanced) [data-order-family-versions] { display: none; }
/* Match the owner's homepage screenshot: dark polygon contacts and dark copyright.
   Keep shared V1 markup/style.css untouched, including the no-JS V2 route. */
body.hicoria-v2-order > .third-section, body:has(#v2-order) > .third-section {
    background: #141715 url('../images/bg.jpg') center center / cover repeat-y !important;
    color: #b7bdbc;
}
body.hicoria-v2-order > .footer, body:has(#v2-order) > .footer { background: #181a1b; color: #b7bdbc; }
body.hicoria-v2-order > .third-section li, body.hicoria-v2-order > .third-section a,
body.hicoria-v2-order > .footer p, body.hicoria-v2-order > .footer a,
body:has(#v2-order) > .third-section li, body:has(#v2-order) > .third-section a,
body:has(#v2-order) > .footer p, body:has(#v2-order) > .footer a { color: #b7bdbc; }
body.hicoria-v2-order > .third-section h3, body:has(#v2-order) > .third-section h3 { color: #eff3ed; }
body.hicoria-v2-order > .third-section a:hover, body.hicoria-v2-order > .footer a:hover,
body.hicoria-v2-order > .third-section a:focus, body.hicoria-v2-order > .footer a:focus,
body:has(#v2-order) > .third-section a:hover, body:has(#v2-order) > .footer a:hover,
body:has(#v2-order) > .third-section a:focus, body:has(#v2-order) > .footer a:focus { color: #a4d74d; }

@media (max-width: 1150px) {
    #v2-order .v2-order-grid { grid-template-columns: minmax(0,1fr) 300px; }
    #v2-order .v2-category-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
    #v2-order .v2-project-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 800px) {
    #v2-order { margin-top: 24px; padding: 0 14px; }
    #v2-order h1 { font-size: 30px; }
    #v2-order .v2-order-heading { gap: 15px; }
    #v2-order .v2-order-heading img { width: 46px; height: 46px; }
    #v2-order .v2-order-grid { grid-template-columns: minmax(0,1fr); }
    #v2-order .v2-order-summary { position: static; }
    #v2-order .v2-order-card { padding: 18px; }
    #v2-order .v2-project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    #v2-order .v2-resource-row .v2-order-field { grid-template-columns: 70px minmax(0,1fr) 114px; gap: 10px; }
}
@media (max-width: 520px) {
    #v2-order .v2-category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    #v2-order .v2-order-runtime-grid, #v2-order .v2-installation-grid, #v2-order .v2-project-grid, #v2-order .v2-version-grid { grid-template-columns: minmax(0,1fr); }
    #v2-order .v2-resource-row .v2-order-field { grid-template-columns: minmax(0,1fr) 112px; }
    #v2-order .v2-resource-row label { grid-column: 1/-1; }
    #v2-order .v2-catalog-heading { flex-wrap: wrap; }
    #v2-order .v2-order-heading img { width: 40px; height: 40px; }
    #v2-order .v2-order-heading { gap: 12px; }
}

#v2-order button.v2-version-card { background: #162016; text-align: left; font-family: gidol,Arial,sans-serif; cursor: pointer; }
#v2-order button.v2-version-card:hover { border-color: #a4d74d; }
#v2-order .v2-preparation-progress p + p { margin-top: 6px; }

/* One selected exact version; older/channel alternatives stay in the select. */
#v2-order .has-version-select .v2-version-card:not(.is-selected){display:none}
#v2-order .has-version-select{grid-template-columns:1fr}

/* Four popular packs first; native details keeps the complete ranking available. */
#v2-order [data-modrinth-top] .v2-project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
#v2-order .v2-top-more { margin-top: 12px; }
#v2-order .v2-top-more > summary { display: flex; align-items: center; justify-content: center; gap: 8px; width: fit-content; min-height: 44px; margin: 0 auto; padding: 8px 18px; border: 1px solid #8fa96e; border-radius: 5px; background: #23321b; color: #eff3ed; font-size: 15px; cursor: pointer; list-style: none; }
#v2-order .v2-top-more > summary::-webkit-details-marker { display: none; }
#v2-order .v2-top-more > summary::before { content: '+'; font-size: 20px; line-height: 1; }
#v2-order .v2-top-more[open] > summary::before { content: '\2212'; }
#v2-order .v2-top-more > summary:hover { border-color: #b5ec76; background: #2d4222; }
#v2-order .v2-top-more > summary:focus-visible { outline: 3px solid #b5ec76; outline-offset: 3px; }
#v2-order .v2-top-show-less, #v2-order .v2-top-more[open] .v2-top-show-more { display: none; }
#v2-order .v2-top-more[open] .v2-top-show-less { display: inline; }
#v2-order .v2-top-more > .v2-project-grid { margin-top: 12px; }
#v2-order .v2-order-name { width: 100%; max-width: 420px; margin: 20px auto; }
#v2-order .v2-order-name > .v2-order-hint { padding: 0; }
@media (max-width: 600px) {
    #v2-order [data-modrinth-top] .v2-project-grid { grid-template-columns: minmax(0,1fr); }
}
