:root {
    --primary: #8B4513;
    --primary-dark: #6B3410;
    --secondary: #A0522D;
    --accent: #CD853F;
    --accent-light: #DDA15E;
    --bg-main: #F5F0E6;
    --bg-card: rgba(180, 120, 50, 0.12);
    --text-dark: #3D2914;
    --text-muted: #6B5B4F;
    --border: #D4C4B0;
    --success: #4A7C59;
    --danger: #A63D40;
    --empty: #9B2335;
    --low: #D4A017;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lora', Georgia, serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-weight: 600;
    color: var(--primary-dark);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent);
}

header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 12px rgba(59, 41, 20, 0.2);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 a {
    font-size: 1.8rem;
    color: #FFFEF9;
    text-decoration: none;
    letter-spacing: 2px;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    height: 60px;
    width: auto;
}

nav {
    display: flex;
    gap: 1.5rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin: 0;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #FFFEF9;
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s;
}

nav a {
    color: #FFFEF9;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.2s;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        margin: 0;
        flex-shrink: 0;
    }

    nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
        padding-top: 0.5rem;
        text-align: center;
    }

    nav.active {
        display: flex;
    }

    nav a {
        padding: 0.75rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    header .header-content {
        position: relative;
    }
}

main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

.container {
    width: 100%;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.page-header h2 {
    font-size: 1.8rem;
    color: var(--primary-dark);
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-search-form {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    max-width: 600px;
    margin: 0 1rem;
}

.header-search {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.8rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    background: var(--bg-main);
    color: var(--text-dark);
}

.header-search:focus {
    outline: none;
    border-color: var(--primary);
}

.header-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-dark);
    white-space: nowrap;
    cursor: pointer;
}

.header-checkbox input {
    cursor: pointer;
    accent-color: var(--primary);
}

.flash-messages {
    margin-bottom: 1.5rem;
}

.flash {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.flash.success {
    background: rgba(74, 124, 89, 0.15);
    border-left: 4px solid var(--success);
    color: var(--success);
}

.flash.error {
    background: rgba(166, 61, 64, 0.15);
    border-left: 4px solid var(--danger);
    color: var(--danger);
}

.filters {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    width: 100%;
}

.filter-search {
    flex: 1;
    min-width: 150px;
    max-width: 300px;
    padding: 0.6rem 0.8rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    background: var(--bg-main);
    color: var(--text-dark);
}

.filter-search:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-select {
    padding: 0.6rem 0.8rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    background: var(--bg-main);
    color: var(--text-dark);
    min-width: 140px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-dark);
    white-space: nowrap;
}

.search-input {
    flex: 1;
    min-width: 120px;
    max-width: 250px;
    padding: 0.6rem 0.8rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text-dark);
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.region-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text-dark);
    min-width: 150px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
    white-space: nowrap;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    accent-color: var(--primary);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: #FFFEF9;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #FFFEF9;
}

.btn-secondary {
    background: var(--border);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: var(--accent-light);
}

.btn-danger {
    background: var(--danger);
    color: #FFFEF9;
}

.btn-danger:hover {
    background: #8B2D30;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-take {
    background: var(--danger);
    color: #FFFEF9;
    width: 100%;
    margin-top: 1rem;
}

.btn-take:hover {
    background: #8B2D30;
}

.btn-refill {
    background: var(--success);
    color: #FFFEF9;
    width: 100%;
    margin-top: 1rem;
}

.btn-refill:hover {
    background: #3A6347;
}

.table-container {
    overflow-x: auto;
    background: transparent;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(59, 41, 20, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--primary);
    color: #FFFEF9;
}

th {
    padding: 1rem;
    text-align: left;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    letter-spacing: 0.5px;
}

th a {
    color: #FFFEF9;
    text-decoration: none;
    display: block;
}

th a:hover {
    text-decoration: underline;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

tbody tr:hover {
    background: rgba(139, 69, 19, 0.05);
}

tbody tr.empty {
    background: rgba(155, 35, 53, 0.25);
}

tbody tr.not-measured {
    background: rgba(128, 128, 128, 0.15);
    font-style: italic;
}

tbody tr.level-1 {
    background: rgba(139, 69, 19, 0.15);
}

tbody tr.level-2 {
    background: rgba(160, 82, 45, 0.15);
}

tbody tr.level-3 {
    background: rgba(205, 133, 63, 0.15);
}

tbody tr.level-4 {
    background: rgba(218, 165, 32, 0.12);
}

tbody tr.level-5 {
    background: rgba(240, 230, 140, 0.12);
}

tbody tr.level-6 {
    background: rgba(255, 254, 249, 0.5);
}

.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ml-cell {
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
}

@media (max-width: 768px) {
    .table-container {
        font-size: 0.8rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 320px;
    }

    th, td {
        padding: 3px 4px;
        white-space: nowrap;
    }

    th a {
        display: block;
        min-height: 44px;
        display: flex;
        align-items: center;
        font-size: 10px;
    }

    .mobile-hide,
    .header-actions,
    .header-checkbox {
        display: none !important;
    }

    .klunk-col {
        display: table-cell;
        width: 45px;
        min-width: 45px;
        max-width: 45px;
    }

    .klunk-col th,
    .klunk-col td {
        font-size: 12px;
        padding: 2px;
        text-align: center;
    }

    .klunk-col td {
        display: flex;
        flex-direction: column;
        gap: 1px;
        align-items: center;
        justify-content: center;
        padding: 2px;
    }

    .klunk-col td form {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .klunk-btn {
        padding: 2px 4px;
        width: 100%;
        min-width: 20px;
        min-height: 20px;
        font-size: 1rem;
        display: block;
        background: none;
        border: none;
        cursor: pointer;
    }

    .name-cell {
        max-width: 120px;
        min-width: 100px;
    }

    .name-cell a {
        font-weight: 500;
        display: block;
        font-size: 10px;
        word-wrap: break-word;
        white-space: normal;
    }

    .poeng-cell {
        font-size: 10px;
        width: 35px;
        min-width: 35px;
        max-width: 35px;
        text-align: center;
        padding: 2px;
    }

    td:not(.klunk-col):not(.name-cell):not(.poeng-cell) {
        font-size: 10px;
        width: 40px;
        min-width: 40px;
        max-width: 45px;
        padding: 2px;
    }

    .action-cell {
        min-width: 80px;
    }

    .user-rating-cell {
        width: 45px;
        min-width: 45px;
        max-width: 45px;
        font-size: 10px;
        text-align: center;
        padding: 2px;
    }

    .page-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .header-search-form {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .header-search {
        width: 100%;
    }
}

.name-cell a {
    font-weight: 500;
}

.duplicate-indicator {
    color: var(--accent);
    font-size: 1.1em;
    margin-left: 0.25rem;
}

.action-cell {
    text-align: right;
}

.btn-view {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: var(--primary);
    color: #FFFEF9;
    border: none;
    border-radius: 6px;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.btn-view:hover {
    background: var(--primary-dark);
    color: #FFFEF9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.empty-message {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-style: italic;
}

.form {
    max-width: 600px;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(59, 41, 20, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

input[type="text"],
input[type="number"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text-dark);
    transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.whisky-detail {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.duplicates-notice {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(59, 41, 20, 0.1);
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent);
}

.duplicates-notice h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.duplicates-table {
    width: 100%;
    border-collapse: collapse;
}

.duplicates-table th,
.duplicates-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.duplicates-table th {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    color: var(--primary-dark);
}

.detail-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(59, 41, 20, 0.1);
}

.detail-card h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
}

.detail-card dl {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.75rem 1rem;
}

.detail-card dt {
    font-weight: 600;
    color: var(--text-muted);
}

.detail-card dd {
    color: var(--text-dark);
}

.detail-card .quantity.empty {
    color: var(--empty);
    font-weight: 600;
}

.detail-card .quantity.low {
    color: var(--low);
    font-weight: 600;
}

.action-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.action-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(59, 41, 20, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.action-card h3 {
    margin-bottom: 1.25rem;
    font-size: 1.2rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    width: auto;
    accent-color: var(--primary);
}

.custom-input {
    margin-top: 1rem;
}

.custom-input input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 6px;
}

.back-link {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.back-link a {
    font-family: 'Cinzel', serif;
}

.import-form {
    display: inline;
}

footer {
    background: var(--primary-dark);
    color: #FFFEF9;
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
}

footer p {
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
}

@media (min-width: 481px) and (max-width: 768px) {
    :root {
        --primary: #8B4513;
        --primary-dark: #6B3410;
    }

    body {
        font-size: 14px;
    }

    header {
        padding: 1rem 1.5rem;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .site-logo {
        height: 40px;
    }

    header h1 a {
        font-size: 1.4rem;
    }

    main {
        padding: 1.5rem 1rem;
    }

    .btn {
        min-height: 44px;
    }

    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .header-search-form {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .header-actions {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .header-actions .btn {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    :root {
        --primary: #8B4513;
        --primary-dark: #6B3410;
    }

    body {
        font-size: 14px;
    }

    header {
        padding: 0.75rem 1rem;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .site-logo {
        height: 32px;
    }

    header h1 a {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }

    main {
        padding: 1rem 0.75rem;
    }

    .page-header h2 {
        font-size: 1.4rem;
    }

    .form {
        padding: 1rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        min-height: 44px;
        font-size: 0.9rem;
    }

    .btn-primary,
    .btn-secondary,
    .btn-danger {
        width: 100%;
        text-align: center;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }

    .header-actions .btn {
        width: 100%;
    }

    .table-container {
        font-size: 0.85rem;
    }

    table th,
    table td {
        padding: 0.5rem;
    }

    .detail-card dl {
        grid-template-columns: 1fr 1fr;
    }

    .action-card {
        padding: 1rem;
    }

    .radio-group label {
        padding: 0.75rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .rating-slider-container {
        flex-direction: column-reverse;
        gap: 1rem;
    }

    #rating-slider {
        width: 100% !important;
        max-width: 280px;
        transform: none !important;
    }

    .rating-current {
        font-size: 2.5rem;
    }

    .whisky-detail {
        gap: 1rem;
    }

    .detail-card h3 {
        font-size: 1.2rem;
    }

    .detail-card dl {
        grid-template-columns: 1fr 1fr;
        font-size: 0.9rem;
    }

    .detail-card dt {
        font-size: 0.85rem;
    }

    .detail-card dd {
        font-size: 0.9rem;
    }

    .action-cards {
        grid-template-columns: 1fr;
    }

    .action-card {
        padding: 1rem;
    }

    .action-card h3 {
        font-size: 1.3rem;
        text-align: center;
    }

    .radio-group label {
        min-height: 48px;
        padding: 0.75rem;
        display: flex;
        align-items: center;
    }

    .radio-group input[type="radio"] {
        width: 20px;
        height: 20px;
    }

    .custom-input input {
        min-height: 44px;
    }

    .smaksrose-container {
        gap: 0.75rem;
    }

    .smartsveileder {
        width: 100% !important;
        max-width: 100% !important;
    }

    .smaksrose-section {
        min-width: 100%;
    }

    #smaksrose-chart-container {
        max-width: 300px !important;
    }

    .overview-columns {
        gap: 1rem;
    }

    .overview-card {
        padding: 0.75rem;
    }

    .overview-card h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .overview-list {
        font-size: 0.85rem;
    }

    .overview-item {
        font-size: 0.8rem;
        padding: 0.4rem 0;
    }

    .overview-item dt,
    .overview-item dd {
        font-size: 0.85rem;
    }

    .overview-divider {
        margin: 0.5rem 0;
    }

    .overview-note {
        font-size: 0.75rem;
    }

    .history-table-compact {
        font-size: 0.7rem;
        overflow-x: visible;
        display: block;
    }

    .history-table-compact thead,
    .history-table-compact tbody {
        display: table;
        width: 100%;
        min-width: auto;
    }

    .history-table-compact th,
    .history-table-compact td {
        padding: 0.3rem 0.4rem;
        font-size: 0.7rem;
        word-wrap: break-word;
        white-space: normal;
    }

    .history-table-compact th.sortable {
        cursor: pointer;
    }

    .overview-item {
        word-wrap: break-word;
        white-space: normal;
    }

    .profile-logo {
        max-width: 120px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    input[type="text"],
    input[type="number"],
    input[type="email"],
    select,
    textarea {
        min-height: 44px;
        font-size: 16px;
    }

    .filter-bar {
        padding: 0.75rem;
    }

    .filter-form {
        flex-direction: column;
        gap: 0.75rem;
    }

    .filter-search,
    .filter-select {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 430px) {
    :root {
        --primary: #8B4513;
        --primary-dark: #6B3410;
    }

    body {
        font-size: 13px;
    }

    header {
        padding: 0.5rem 0.75rem;
    }

    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        gap: 0;
    }

    .logo-title {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex: 1;
        min-width: 0;
    }

    .site-logo {
        height: 28px;
        width: auto;
        flex-shrink: 0;
    }

    header h1 a {
        font-size: 1rem;
        white-space: nowrap;
    }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        margin: 0;
        flex-shrink: 0;
        align-self: center;
    }

    .nav-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: #FFFEF9;
        margin: 3px 0;
        border-radius: 2px;
        transition: all 0.3s;
    }

    #main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0.25rem;
        padding-top: 0.5rem;
        text-align: center;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        padding: 0.75rem;
        box-shadow: 0 4px 12px rgba(59, 41, 20, 0.2);
    }

    #main-nav.active {
        display: flex;
    }

    #main-nav a {
        padding: 0.6rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.9rem;
    }

    main {
        padding: 0.75rem 0.5rem;
        overflow-x: hidden;
    }

    .page-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
        margin-bottom: 1rem;
    }

    .page-header h2 {
        font-size: 1.2rem;
    }

    .whisky-detail {
        gap: 0.75rem;
    }

    .detail-card {
        padding: 0.75rem;
    }

    .detail-card h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .detail-card dl {
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem 0.5rem;
    }

    .detail-card dt {
        font-size: 0.75rem;
        color: var(--text-muted);
    }

    .detail-card dd {
        font-size: 0.8rem;
        font-weight: 500;
    }

    .action-cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .action-card {
        padding: 0.75rem;
    }

    .action-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .radio-group label {
        min-height: 44px;
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .radio-group input[type="radio"] {
        width: 18px;
        height: 18px;
    }

    .btn-take {
        min-height: 48px;
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }

    .rating-slider-container {
        flex-direction: column-reverse;
        gap: 0.75rem;
        padding: 0.5rem;
    }

    .rating-current {
        font-size: 2rem;
    }

    .rating-heading {
        font-size: 0.9rem;
    }

    #rating-slider {
        width: 100% !important;
        max-width: 250px;
        transform: none !important;
        touch-action: none;
    }

    #rating-slider::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
    }

    #rating-slider::-moz-range-thumb {
        width: 28px;
        height: 28px;
    }

    .back-link {
        margin-top: 1rem;
        padding-top: 0.75rem;
    }

    .back-link a {
        display: inline-block;
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .duplicates-notice {
        padding: 0.75rem;
        margin-top: 1rem;
    }

    .duplicates-notice h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .duplicates-table th,
    .duplicates-table td {
        padding: 0.4rem;
        font-size: 0.8rem;
    }

    .smaksrose-container {
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .smaksrose-section {
        min-width: 100%;
    }

    #smaksrose-chart-container {
        max-width: 280px !important;
    }

    .smaksrose-info {
        font-size: 0.8rem;
    }

    .smartsveileder {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.75rem;
        max-height: 400px;
    }

    .smartsveileder h3 {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .kategori-item summary {
        padding: 0.5rem 0;
        font-size: 0.85rem;
    }

    .kategori-desc {
        font-size: 0.8rem;
        padding: 0.25rem 0 0.5rem 0.75rem;
    }

    .form {
        padding: 0.75rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    label {
        font-size: 0.9rem;
    }

    input[type="text"],
    input[type="number"],
    input[type="email"],
    select,
    textarea {
        font-size: 16px;
        min-height: 44px;
        padding: 0.5rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-actions .btn {
        width: 100%;
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 350px) {
    .smaksrose-container {
        display: none;
    }
}

.user-info {
    color: #FFFEF9;
    font-size: 0.9rem;
}

.user-info a {
    color: var(--accent-light);
}

.user-name {
    color: var(--accent-light);
    font-weight: 600;
}

.user-name:hover {
    text-decoration: underline;
}

.select-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.select-container h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.login-logo {
    margin-bottom: 2rem;
}

.login-logo img {
    width: 150px;
    height: auto;
}

.login-logo-background {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: auto;
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
}

.login-logo-background img {
    width: 100%;
    height: auto;
}

.logo-background {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: auto;
    opacity: 0.08;
    pointer-events: none;
    z-index: -1;
}

.logo-background img {
    width: 100%;
    height: auto;
}

.member-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.member-btn {
    display: block;
    padding: 1rem 2rem;
    background: var(--primary);
    color: #FFFEF9;
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
}

.member-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.guest-section {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.guest-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--secondary);
    color: #FFFEF9;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
}

.guest-btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.whiskytreff-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary);
    color: #FFFEF9;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
    border: 2px solid var(--primary-dark);
}

.whiskytreff-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.form-container {
    max-width: 500px;
    margin: 0 auto;
}

.form-container h2 {
    margin-bottom: 2rem;
    text-align: center;
}

.history-container {
    max-width: 900px;
    margin: 0 auto;
}

.history-container h2 {
    margin-bottom: 2rem;
    text-align: center;
}

.history-table {
    width: 100%;
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(59, 41, 20, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.history-table th {
    background: var(--primary);
    color: #FFFEF9;
    padding: 1rem;
    text-align: left;
    font-family: 'Cinzel', serif;
}

.history-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.history-table tbody tr:hover {
    background: rgba(139, 69, 19, 0.05);
}

.no-history {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-style: italic;
}

.history-container .btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--border);
    color: var(--text-dark);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.history-container .btn-secondary:hover {
    background: var(--accent-light);
}

.overview-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.overview-stats-column,
.overview-history-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.overview-card {
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(59, 41, 20, 0.1);
    padding: 1.5rem;
}

.overview-card h3 {
    font-family: 'Cinzel', serif;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

.overview-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.overview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.overview-item dt {
    font-weight: 500;
    color: var(--text-dark);
}

.overview-item dd {
    margin: 0;
    font-weight: 600;
    color: var(--primary);
}

.overview-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0;
}

.overview-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1rem;
    text-align: center;
}

.history-table-compact {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.history-table-compact th {
    background: var(--primary);
    color: #FFFEF9;
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
}

.history-table-compact th.sortable {
    cursor: pointer;
    user-select: none;
}

.history-table-compact th.sortable:hover {
    background: var(--primary-dark);
}

.sort-icon {
    font-size: 0.75rem;
    opacity: 0.6;
    margin-left: 0.25rem;
}

th.sort-asc .sort-icon,
th.sort-desc .sort-icon {
    opacity: 1;
}

.history-table-compact td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

.history-table-compact tbody tr:hover {
    background: rgba(139, 69, 19, 0.05);
}

.view-more {
    text-align: right;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.view-more a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.view-more a:hover {
    text-decoration: underline;
}

.overview-logo {
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.profile-logo {
    max-width: 200px;
    height: auto;
}

@media (max-width: 768px) {
    .overview-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .smaksrose-container {
        flex-direction: column !important;
    }
    
    .smartsveileder {
        width: 100% !important;
        max-height: none !important;
    }
}

@media (max-width: 768px) {
    .smaksrose-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .smaksrose-section {
        width: 100%;
    }
    
    #smaksrose-chart-container {
        max-width: 320px !important;
        margin: 0 auto;
    }
}

.smartsveileder {
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(59, 41, 20, 0.1);
    padding: 1.5rem;
    border: 2px solid var(--border);
}

.smartsveileder h3 {
    font-family: 'Cinzel', serif;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.smartsveileder p {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.kategori-item {
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

.kategori-item:last-child {
    border-bottom: none;
}

.kategori-item summary {
    padding: 0.75rem 0;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-dark);
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.kategori-item summary:hover {
    color: var(--primary);
}

.kategori-item summary::-webkit-details-marker {
    display: none;
}

.kategori-item summary::before {
    content: '▶';
    font-size: 0.7rem;
    color: var(--primary);
    transition: transform 0.2s;
}

.kategori-item[open] summary::before {
    transform: rotate(90deg);
}

.kategori-desc {
    padding: 0.5rem 0 1rem 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 900px) {
    .smaksrose-container {
        flex-direction: column !important;
    }
    
    .smartsveileder {
        width: 100% !important;
        max-height: none !important;
    }
}

/* Rating Slider - Vertical with whisky colors */
.rating-slider-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    margin: auto 0;
}

.rating-labels {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.rating-current {
    font-size: 3rem;
    font-weight: bold;
    color: #5D3A1A;
    line-height: 1;
}

.rating-heading {
    font-size: 1.1rem;
    color: #5D3A1A;
    font-weight: bold;
    margin: 0;
}

#rating-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 280px;
    height: 14px;
    background: linear-gradient(to right, #8B4513, #D4A574);
    border-radius: 7px;
    transform: rotate(-90deg);
    transform-origin: center;
    cursor: pointer;
}

#rating-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: #5D3A1A;
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#rating-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #5D3A1A;
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border: none;
}

/* Mobile: same as desktop - vertical slider */
@media (max-width: 768px) {
    .rating-slider-container {
        gap: 12px;
        padding: 10px;
    }
    
    .rating-current {
        font-size: 2.5rem;
    }
    
    #rating-slider {
        width: 280px;
    }
    
    .smaksrose-section {
        order: -1;
    }
}

@media (max-width: 480px) {
    .rating-slider-container {
        flex-direction: column-reverse;
        gap: 1rem;
        padding: 1rem;
    }
    
    .rating-current {
        font-size: 3rem;
    }
    
    #rating-slider {
        width: 100%;
        max-width: 320px;
        transform: none !important;
    }
    
    .rating-heading {
        font-size: 1rem;
    }
    
    .btn-take {
        min-height: 56px;
        font-size: 1.2rem;
    }
    
    .back-link {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
    
    .back-link a {
        display: inline-block;
        padding: 0.75rem 1rem;
        min-height: 44px;
    }
}
