
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --green: #225735;
    --green-dark: #123f2b;
    --green-mid: #4f7655;
    --green-soft: #eaf1e6;
    --green-pale: #f3f6ee;
    --cream: #fbfaf6;
    --white: #ffffff;
    --text: #202823;
    --muted: #68716b;
    --border: #e2e6df;
    --shadow: 0 10px 28px rgba(32, 50, 40, 0.08);
    --radius: 14px;
    --container: 1180px;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: var(--green);
    text-decoration: none;
}

a:hover {
    color: var(--green-dark);
}

.container {
    width: min(calc(100% - 48px), var(--container));
    margin-inline: auto;
}

/* Typography */

h1,
h2,
h3,
.site-name {
    margin-top: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--green-dark);
    font-weight: 400;
    line-height: 1.12;
}

p {
    margin-top: 0;
}

/* Header */

.site-header {
    border-bottom: 1px solid var(--border);
    background: rgba(251, 250, 246, 0.96);
}

.header-bar {
    min-height: 104px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    padding: 16px 0;
}

.site-name {
    display: block;
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.8rem);
    letter-spacing: 0.025em;
    text-transform: uppercase;
}
.site-logo {
    height: 120px;
    width: auto;
    display: block;
}

.site-logo-link {
    display: inline-block;
}

.site-tagline {
    margin: 0;
    color: var(--green-mid);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.98rem;
}

.account-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    color: var(--green-dark);
}

/* Hero */

.welcome-section {
    padding: 0;
    overflow: hidden;
}

.welcome-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(430px, 0.98fr);
    align-items: center;
    gap: 24px;
}

.welcome-copy {
    position: relative;
    z-index: 2;
    padding: 30px 0 20px;
}

.welcome-copy h1 {
    margin-bottom: 18px;
    font-size: clamp(2.2rem, 3vw, 3rem);
    letter-spacing: -0.02em;
    line-height: 1.18;
}

.welcome-copy h1 span {
    display: block;
}

.welcome-copy h1 span + span {
    margin-top: 8px;
}


.welcome-art {
    align-self: stretch;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.welcome-art img {
    width: min(100%, 650px);
    height: auto;
    object-fit: contain;
    object-position: center bottom;
}

.welcome-features {
    max-width: 620px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.welcome-feature {
    min-width: 0;
    text-align: center;
}
.welcome-search {
    margin-top: 2rem;
}

.keyword-search {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 540px;
}

.keyword-search input {
    flex: 2;
    padding: 0.9rem 1.2rem;
    font-size: 1rem;
    border: 1px solid #d7d2c5;
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
}

.keyword-search input:focus {
    outline: none;
    border-color: #5f7a55;
}

.keyword-search button {
    padding: 0.9rem 1rem;
    border: none;
    border-radius: 999px;
    background: #2f5a3a;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.keyword-search button:hover {
    background: #24472d;
}

.feature-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--green-pale);
    color: var(--green-dark);
}

.feature-icon svg {
    width: 31px;
    height: 31px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.welcome-feature p {
    margin: 0;
    color: #2d352f;
    font-size: 0.91rem;
    line-height: 1.45;
}

/* Ask-a-question panel */

.question-panel-section {
    padding: 12px 0 20px;
}

.question-panel {
    min-height: 134px;
    padding: 24px 26px;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    align-items: center;
    gap: 28px;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--text);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.question-panel:hover {
    color: var(--text);
}

.question-prompt {
    display: flex;
    align-items: center;
    gap: 18px;
}

.question-prompt strong,
.question-prompt small {
    display: block;
}

.question-prompt strong {
    margin-bottom: 5px;
    color: var(--green-dark);
    font-size: 1.12rem;
}

.question-prompt small {
    color: #344039;
    font-size: 0.95rem;
    line-height: 1.55;
}

.question-sprig {
    flex: 0 0 auto;
    width: 28px;
    color: #6d8d57;
}

.question-sprig svg {
    width: 100%;
    height: auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.question-field {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 0;
}

.question-field form {
    display: flex;
    width: 100%;
}

.question-field input[type="text"] {
    flex: 1;
    height: 52px;
    padding: 0 18px;

    background: var(--cream);

    border: 2px solid #d8ddd2;
    border-right: none;

    border-radius: 999px 0 0 999px;

    font: inherit;
    font-size: 1rem;
    color: var(--text);
}

.question-field input[type="text"]::placeholder {
    color: #788178;
}

.question-field input[type="text"]:focus {
    outline: none;
    border-color: #5f7a55;
}

.question-field button {
    height: 52px;
    padding: 0 24px;

    background: var(--green);
    border: 2px solid var(--green);
    border-radius: 0 999px 999px 0;

    color: var(--white);
    font: inherit;
    font-weight: 600;

    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.question-field button:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
}

/* Noticeboard */

.noticeboard-section {
    padding: 24px 0 20px;
}

.section-heading {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.section-heading h2 {
    margin: 0;
    font-size: 2rem;
    letter-spacing: 0.02em;
}

.section-heading h2::after {
    content: "";
    display: block;
    width: 52px;
    height: 2px;
    margin-top: 7px;
    background: var(--green-mid);
}

.section-link {
    color: var(--green-mid);
    font-size: 0.86rem;
    white-space: nowrap;
}

.conversation-list {
    display: grid;
    gap: 10px;
}

.conversation-card {
    min-height: 112px;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 78px 118px;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
    background: var(--white);
    border: 1px solid #e4e8e1;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(25, 50, 34, 0.055);
}

.conversation-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    background: transparent;
    border-radius: 0;
}

.conversation-icon img {
    display: block;
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.conversation-main {
    min-width: 0;
}

.conversation-main h3 {
    margin: 0 0 3px;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.conversation-main h3 a {
    color: var(--green-dark);
}

.conversation-author,
.conversation-preview {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.45;
}

.conversation-author {
    color: #6f766f;
}

.conversation-author strong {
    color: #4e5a51;
    font-weight: 600;
}

.conversation-preview {
    margin-top: 3px;
    color: #3f4942;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-replies {
    text-align: center;
    color: var(--green-dark);
}

.conversation-replies strong,
.conversation-replies span {
    display: block;
}

.conversation-replies strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.65rem;
    font-weight: 400;
    line-height: 1;
}

.conversation-replies span {
    margin-top: 3px;
    color: #69726c;
    font-size: 0.7rem;
}

.conversation-last {
    min-height: 58px;
    padding-left: 18px;
    display: flex;
    align-items: center;
    border-left: 1px solid #dde3dc;
    color: #7b837d;
    font-size: 0.74rem;
}

.empty-noticeboard {
    padding: 38px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: center;
}

.village-values {
    margin-top: 10px;
    padding: 0;
}

.tearoom-banner {
    margin: 0 auto;
    max-width: 650px;
    line-height: 0;
}

.tearoom-banner img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

/* Footer */

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--cream);
    padding: 22px 0;
    text-align: center;
}

.site-footer .container {
    display: block;
}

.footer-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.footer-nav a {
    color: var(--green-mid);
    text-decoration: none;
    font-size: 0.85rem;
}

.footer-nav a:hover {
    color: var(--green-dark);
}

.footer-divider {
    color: #b8beb6;
    font-size: 0.8rem;
    line-height: 1;
}

.footer-copy {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
}

/* Search page */

.search-page {
    padding-top: 34px;
    padding-bottom: 60px;
}

.search-page-header {
    margin-bottom: 22px;
}

.search-page-header h1 {
    margin-bottom: 6px;
    font-size: 2rem;
}

.search-page-header h1::after {
    content: "";
    display: block;
    width: 52px;
    height: 2px;
    margin-top: 9px;
    background: var(--green-mid);
}

.search-page-header p {
    margin: 10px 0 0;
    color: var(--muted);
}

.search-page-form {
    max-width: 680px;
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.search-page-form input {
    flex: 1;
    min-width: 0;
    height: 52px;
    padding: 0 20px;
    border: 1px solid #d7d2c5;
    border-radius: 999px;
    background: var(--white);
    color: var(--text);
    font: inherit;
}

.search-page-form input:focus {
    outline: none;
    border-color: var(--green-mid);
}

.search-page-form button,
.search-question-button {
    min-height: 52px;
    padding: 0 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: var(--green);
    color: var(--white);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.search-page-form button:hover,
.search-question-button:hover {
    background: var(--green-dark);
    color: var(--white);
}

.search-results-heading {
    margin-bottom: 12px;
}

.search-results-heading h2 {
    margin: 0;
    font-size: 1.55rem;
}

.search-results-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.search-results-list {
    display: grid;
    gap: 10px;
}

.search-result-card{
    min-height:112px;
    display:grid;
    grid-template-columns:minmax(0,1fr) 90px 110px;
    align-items:center;
    gap:20px;
    padding:18px 20px;
    background:var(--white);
    border:1px solid #e4e8e1;
    border-radius:10px;
    box-shadow:0 2px 8px rgba(25,50,34,.055);
}

.search-result-main{
    min-width:0;
}

.search-result-main h3 {
    margin: 0 0 4px;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

.search-result-author,
.search-result-preview {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.5;
}

.search-result-author {
    color: var(--muted);
}

.search-result-preview {
    margin-top: 4px;
    color: #3f4942;
}
.search-result-topic{
    text-align:center;
    color:#68716b;
    font-size:.82rem;
}

.search-result-activity{
    min-height:58px;
    padding-left:18px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    border-left:1px solid #dde3dc;
}

.search-result-activity strong{
    font-size:.82rem;
    font-weight:600;
    color:var(--green-dark);
}

.search-result-activity span{
    margin-top:4px;
    font-size:.74rem;
    color:var(--muted);
}

.search-result-replies {
    min-height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #dde3dc;
    color: var(--green-dark);
}

.search-result-replies strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.65rem;
    font-weight: 400;
    line-height: 1;
}

.search-result-replies span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.7rem;
}

.search-message {
    max-width: 680px;
    padding: 30px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.search-message h2 {
    margin-bottom: 8px;
    font-size: 1.45rem;
}

.search-message p {
    margin-bottom: 20px;
    color: var(--muted);
}

/* Conversation page */

.conversation-page {
    max-width: 900px;
    padding-top: 34px;
    padding-bottom: 70px;
}

.conversation-back {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--green-mid);
    font-size: 0.88rem;
}

.conversation-back:hover {
    color: var(--green-dark);
}

.original-post,
.reply,
.no-replies,
.reply-login-message,
.conversation-message {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(25, 50, 34, 0.055);
}

.original-post {
    padding: 28px 30px 22px;
}

.original-post-header {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.original-post h1 {
    margin: 0 0 8px;
    font-size: clamp(2rem, 4vw, 2.7rem);
    line-height: 1.12;
}

.post-details,
.reply-details {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.post-details strong,
.reply-details strong {
    color: #4e5a51;
    font-weight: 600;
}

.post-content,
.reply-content {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.75;
}

.post-content {
    margin: 24px 0;
    padding: 20px;
    background: #f7f8f5;
    border-left: 4px solid var(--green-dark);
    border-radius: 6px;
}

.conversation-likes,
.reply-likes {
    color: var(--muted);
    font-size: 0.78rem;
}

.conversation-likes form,
.reply-likes form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.conversation-likes button,
.reply-likes button {
    padding: 5px 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: 1px solid #ccd5cb;
    border-radius: 999px;
    color: var(--green-dark);
    font: inherit;
    cursor: pointer;
}

.conversation-likes button:hover,
.reply-likes button:hover,
.conversation-likes button.is-liked,
.reply-likes button.is-liked {
    background: var(--green-pale);
    border-color: var(--green-mid);
}

.conversation-likes button span,
.reply-likes button span {
    font-size: 1rem;
    line-height: 1;
}

.like-count {
    color: var(--muted);
}

.replies,
.reply-form {
    margin-top: 34px;
}

.conversation-section-heading {
    margin-bottom: 14px;
}

.conversation-section-heading h2 {
    margin: 0;
    font-size: 1.65rem;
}

.conversation-section-heading h2::after {
    content: "";
    display: block;
    width: 48px;
    height: 2px;
    margin-top: 7px;
    background: var(--green-mid);
}

.conversation-section-heading h2 span {
    margin-left: 6px;
    color: var(--muted);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
}
/* Ask Question */

.new-question-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.new-question-form label {
    color: var(--green-dark);
    font-weight: 600;
}

.new-question-form input,
.new-question-form textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--cream);
    border: 1px solid #d7dcd4;
    border-radius: 9px;
    color: var(--text);
    font: inherit;
}

.new-question-form textarea {
    resize: vertical;
    min-height: 220px;
    line-height: 1.6;
}

.new-question-form input:focus,
.new-question-form textarea:focus {
    outline: none;
    border-color: var(--green-mid);
    box-shadow: 0 0 0 3px rgba(79,118,85,.12);
}

.reply-list {
    display: grid;
    gap: 12px;
}

.reply {
    padding: 22px 24px 18px;
}

.reply-content {
    margin-bottom: 16px;
}

.reply-details {
    margin-bottom: 14px;
}

.no-replies,
.reply-login-message,
.conversation-message {
    padding: 26px;
}

.no-replies p,
.reply-login-message p,
.conversation-message p {
    margin: 0;
    color: var(--muted);
}

.conversation-message h1 {
    margin-bottom: 8px;
    font-size: 2rem;
}

.conversation-message a {
    display: inline-block;
    margin-top: 18px;
}

.reply-form form {
    padding: 26px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(25, 50, 34, 0.055);
}

.reply-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--green-dark);
    font-weight: 600;
}

.reply-form textarea {
    width: 100%;
    min-height: 170px;
    padding: 14px 16px;
    resize: vertical;
    background: var(--cream);
    border: 1px solid #d7dcd4;
    border-radius: 9px;
    color: var(--text);
    font: inherit;
    line-height: 1.6;
}

.reply-form textarea:focus {
    outline: none;
    border-color: var(--green-mid);
    box-shadow: 0 0 0 3px rgba(79, 118, 85, 0.12);
}

.reply-form-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
}

.reply-form button[type="submit"] {
    min-height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--green);
    color: var(--white);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.reply-form button[type="submit"]:hover {
    background: var(--green-dark);
}

.reply-error {
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #fff5f3;
    border: 1px solid #e5c9c2;
    border-radius: 8px;
    color: #7d3429;
}
.reply-error:empty {
    display: none;
}

.search-help-panel {
    margin-top: 32px;
    padding: 34px;
    text-align: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(25, 50, 34, 0.055);
}

.search-help-panel h2 {
    margin-bottom: 12px;
    font-size: 1.7rem;
}

.search-help-panel p {
    max-width: 620px;
    margin: 0 auto 12px;
    color: var(--muted);
    line-height: 1.7;
}

.search-help-panel .search-question-button {
    margin-top: 14px;
}


/* Login and registration */

.auth-page {
    max-width: 590px;
    padding-top: 48px;
    padding-bottom: 80px;
}

.auth-card {
    padding: 42px 46px 36px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(28, 53, 35, 0.07);
}

.auth-header {
    margin-bottom: 32px;
    text-align: center;
}

.auth-kicker {
    margin: 0 0 8px;
    color: var(--green-mid);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.92rem;
    font-style: italic;
}

.auth-header h1 {
    margin: 0 0 14px;
    color: var(--green-dark);
    font-size: clamp(2.2rem, 6vw, 3rem);
    line-height: 1.05;
}

.auth-intro {
    max-width: 440px;
    margin: 0 auto;
    color: var(--muted);
    line-height: 1.7;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 21px;
}

.auth-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--green-dark);
    font-weight: 600;
}

.auth-field label span {
    margin-left: 5px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 400;
}

.auth-field input {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    background: var(--cream);
    border: 1px solid #cfd6cd;
    border-radius: 8px;
    color: var(--text);
    font: inherit;
}

.auth-field input::placeholder {
    color: #929a91;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--green-mid);
    box-shadow: 0 0 0 3px rgba(79, 118, 85, 0.12);
}

.auth-button {
    width: 100%;
    min-height: 49px;
    margin-top: 5px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: var(--green);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.auth-button:hover {
    background: var(--green-dark);
}

.auth-footer {
    margin-top: 30px;
    padding-top: 23px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.auth-footer p {
    margin: 0;
    color: var(--muted);
}

.auth-footer a {
    color: var(--green-dark);
    font-weight: 600;
}

.auth-message {
    margin: 0 0 25px;
    padding: 12px 15px;
    border-radius: 8px;
    text-align: center;
    line-height: 1.5;
}

.auth-error {
    background: #fff5f3;
    border: 1px solid #e5c9c2;
    color: #7d3429;
}

.auth-success {
    background: var(--green-pale);
    border: 1px solid #cbd8ca;
    color: var(--green-dark);
}


    /* ==========================================================
   ASK QUESTION PAGE — TOPIC AND BUTTON
   ========================================================== */

.form-optional {
    margin-left: 5px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 400;
    font-style: italic;
}

.new-question-form select {
    width: 100%;
    min-height: 51px;
    padding: 14px 46px 14px 16px;

    background-color: var(--cream);
    border: 1px solid #d7dcd4;
    border-radius: 9px;

    color: var(--text);
    font: inherit;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-image:
        linear-gradient(
            45deg,
            transparent 50%,
            var(--green-mid) 50%
        ),
        linear-gradient(
            135deg,
            var(--green-mid) 50%,
            transparent 50%
        );

    background-position:
        calc(100% - 22px) 50%,
        calc(100% - 16px) 50%;

    background-size: 6px 6px;
    background-repeat: no-repeat;
}

.new-question-form select:focus {
    outline: none;
    border-color: var(--green-mid);
    box-shadow: 0 0 0 3px rgba(79, 118, 85, 0.12);
}

.new-question-form .reply-form-actions button[type="submit"] {
    min-height: 48px;
    padding: 0 24px;

    border: 0;
    border-radius: 999px;

    background: var(--green);
    color: var(--white);

    font: inherit;
    font-weight: 600;

    cursor: pointer;
    transition: background 0.2s ease;
}

.new-question-form .reply-form-actions button[type="submit"]:hover {
    background: var(--green-dark);
}


/* Tearoom */

.tearoom-tables {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    max-width: 760px;
    margin: 2rem auto 0;
}

.tearoom-table {
    display: block;
    padding: 1.6rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    color: inherit;
    text-decoration: none;
    transition: 0.2s ease;
    box-shadow: 0 2px 8px rgba(25, 50, 34, 0.05);
}

.tearoom-table:hover,
.tearoom-table:focus {
    background: var(--green-pale);
    border-color: var(--green-mid);
    transform: translateY(-2px);
}

.tearoom-table h2 {
    margin: 0 0 0.75rem;
    font-size: 1.4rem;
    color: var(--green-dark);
}

.tearoom-table p {
    margin: 0 0 1.2rem;
    color: var(--muted);
    line-height: 1.6;
}

.tearoom-table span {
    display: inline-block;
    color: var(--green);
    font-weight: 600;
}
.tearoom-messages {
    background: #ffffff;
    border: 1px solid #d8ddd6;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    width: 75%;
    height: 360px;
    overflow-y: auto;
    box-sizing: border-box;
}

.tearoom-post-form textarea {
    display: block;
    width: 55%;
    height: 180px;
    padding: 15px;
    border: 1px solid #d8ddd6;
    border-radius: 8px;
    font: inherit;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
    margin: 0;
}
.tearoom-message {
    padding: 14px 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid #e6e6e6;
}

.tearoom-message:last-child {
    border-bottom: none;
}

.tearoom-message strong {
    font-size: 1rem;
    font-weight: 600;
}

.tearoom-message span {
    margin-left: 18px;
    color: #777;
    font-size: 0.85rem;
}

.tearoom-message p {
    margin: 8px 0 0;
    line-height: 1.6;
}

.speaker-1  { color: #2f6b3f; }
.speaker-2  { color: #7a4f24; }
.speaker-3  { color: #315f8a; }
.speaker-4  { color: #7b3f61; }
.speaker-5  { color: #28706c; }
.speaker-6  { color: #8a4b3c; }
.speaker-7  { color: #5d568f; }
.speaker-8  { color: #657226; }

.speaker-9  { color: #3d6f91; }
.speaker-10 { color: #8a5b2d; }
.speaker-11 { color: #426c50; }
.speaker-12 { color: #7a486f; }
.speaker-13 { color: #3d7180; }
.speaker-14 { color: #914f52; }
.speaker-15 { color: #58628f; }
.speaker-16 { color: #71712f; }

.speaker-17 { color: #27634d; }
.speaker-18 { color: #6f742f; }
.speaker-19 { color: #365f96; }
.speaker-20 { color: #854362; }
.speaker-21 { color: #24746b; }
.speaker-22 { color: #94522f; }
.speaker-23 { color: #65508f; }
.speaker-24 { color: #4f713b; }

.speaker-25 { color: #396c85; }
.speaker-26 { color: #80522f; }
.speaker-27 { color: #3f7059; }
.speaker-28 { color: #874b72; }
.speaker-29 { color: #376d75; }
.speaker-30 { color: #8a4f46; }
.speaker-31 { color: #555f91; }
.speaker-32 { color: #6b712d; }
.reply-form-actions {
    margin-top: 15px;
}

.reply-form-actions button {
    background: #0b3d2e;
    color: #ffffff;
    border: 1px solid #0b3d2e;
    border-radius: 6px;
    padding: 10px 18px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.reply-form-actions button:hover {
    background: #14503d;
}

#typing-indicator {
    min-height: 22px;
    margin: 8px 0 16px;
    font-style: italic;
    color: #6b746b;
    font-size: 0.9rem;
}
/* ==========================================================
   CONVERSATION PAGE — MATCH HOMEPAGE / NOTICEBOARD
   ========================================================== */

.conversation-page {
    max-width: var(--container);
    padding-top: 28px;
    padding-bottom: 60px;
}

.conversation-back {
    margin-bottom: 12px;
    font-size: 0.82rem;
}

.original-post {
    padding: 20px 22px 18px;
    border-radius: 10px;
}

.original-post-header {
    margin-bottom: 16px;
    padding-bottom: 14px;
}

.conversation-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.original-post-header .conversation-title-icon {
    width: 32px;
    height: 32px;
    max-width: 32px;
    object-fit: contain;
    flex: 0 0 32px;
}

.conversation-heading h1 {
    margin: 0;
    min-width: 0;
}

.original-post h1 {
    margin: 0 0 6px;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
}

.post-details,
.reply-details {
    font-size: 0.76rem;
    line-height: 1.45;
}

.post-content {
    margin: 0 0 16px;
    padding: 0;
    background: transparent;
    border-left: 0;
    border-radius: 0;
    font-size: 0.94rem;
    line-height: 1.7;
}

.conversation-likes {
    padding-top: 13px;
    border-top: 1px solid var(--border);
}

.conversation-likes button,
.reply-likes button {
    padding: 4px 9px;
    font-size: 0.76rem;
}

.replies,
.reply-form {
    margin-top: 24px;
}

.conversation-section-heading {
    margin-bottom: 10px;
}

.conversation-section-heading h2 {
    font-size: 1.35rem;
}

.conversation-section-heading h2::after {
    width: 42px;
    margin-top: 6px;
}

.conversation-section-heading .reply-count {
    margin-left: 5px;
    font-size: 0.76rem;
}

.reply-list {
    gap: 10px;
}

.reply {
    padding: 17px 20px 15px;
    border-radius: 10px;
}

.reply-content {
    margin-bottom: 10px;
    font-size: 0.9rem;
    line-height: 1.65;
}

.reply-details {
    margin-bottom: 10px;
}

.reply-likes {
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.no-replies,
.reply-login-message,
.conversation-message {
    padding: 22px;
}

.reply-form form {
    padding: 20px 22px;
    border-radius: 10px;
}

.reply-form label {
    margin-bottom: 6px;
    font-size: 0.86rem;
}

.reply-form textarea {
    min-height: 135px;
    padding: 12px 14px;
    font-size: 0.92rem;
}

.reply-form-actions {
    margin-top: 15px;
    display: block;
}

.reply-form button[type="submit"] {
    min-height: 42px;
    padding: 0 20px;
    font-size: 0.88rem;
}

/* About page */

.about-page {
    padding-top: 42px;
    padding-bottom: 72px;
}

.about-page .container {
    max-width: 900px;
}

.about-header {
    margin-bottom: 42px;
}

.about-kicker {
    margin: 0 0 8px;
    color: var(--green-mid);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.92rem;
    font-style: italic;
}

.about-header h1 {
    margin-bottom: 14px;
    font-size: clamp(2.3rem, 5vw, 3.4rem);
}

.about-header h1::after {
    content: "";
    display: block;
    width: 56px;
    height: 2px;
    margin-top: 10px;
    background: var(--green-mid);
}

.about-intro {
    max-width: 700px;
    margin: 0;
    color: var(--muted);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.16rem;
    line-height: 1.8;
}

.about-content {
    max-width: 760px;
}

.about-section {
    margin-top: 34px;
}

.about-section:first-child {
    margin-top: 0;
}

.about-section h2 {
    margin: 0 0 12px;
    color: var(--green-dark);
    font-size: 1.35rem;
}

.about-section p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.about-section-highlight {
    padding: 24px 26px;
    background: var(--green-pale);
    border-left: 3px solid var(--green-mid);
    border-radius: 8px;
}

.about-section-highlight p:last-child {
    margin-bottom: 0;
}

.about-welcome {
    margin-top: 42px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.about-welcome p {
    margin: 0;
    color: var(--green-dark);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.18rem;
    font-style: italic;
    line-height: 1.7;
}

.search-result-topic {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 60px;
}

.search-result-topic img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    display: block;
}

/* ==========================================================
   RESPONSIVE — ALL BREAKPOINTS
   ========================================================== */

@media (max-width: 940px) {
    .welcome-layout {
        min-height: 0;
    }

    .welcome-copy {
        padding-bottom: 12px;
    }

    .welcome-art {
        justify-content: center;
        max-height: 430px;
    }

    .welcome-art img {
        max-height: 430px;
    }

    .question-panel {
        display: flex;
        align-items: center;
        gap: 24px;
        width: 100%;
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0;
    }
}

@media (max-width: 700px) {
    .conversation-card {
        grid-template-columns: 46px minmax(0, 1fr) 62px;
        gap: 13px;
        padding: 14px;
    }

    .conversation-icon {
        width: 42px;
        height: 42px;
    }

    .conversation-last {
        grid-column: 2 / 4;
        min-height: 0;
        padding: 8px 0 0;
        border-left: 0;
        border-top: 1px solid #e3e7e1;
    }
}

@media (max-width: 650px) {
    .conversation-page {
        padding-top: 22px;
    }

    .original-post {
        padding: 18px 16px 16px;
    }

    .original-post h1 {
        font-size: 1.2rem;
    }

    .reply {
        padding: 16px;
    }

    .reply-form form {
        padding: 18px 16px;
    }

    .reply-form-actions {
        justify-content: stretch;
    }

    .reply-form button[type="submit"] {
        width: 100%;
    }

    .auth-page {
        padding-top: 28px;
        padding-bottom: 55px;
    }

    .auth-card {
        padding: 32px 22px 28px;
        border-radius: 10px;
    }

    .auth-header {
        margin-bottom: 27px;
    }

    .auth-header h1 {
        font-size: 2.25rem;
    }

    .new-question-form .reply-form-actions button[type="submit"] {
        width: 100%;
    }

    .container {
        width: min(calc(100% - 30px), var(--container));
    }

    .site-name {
        font-size: 2rem;
    }

    .account-nav {
        padding-top: 8px;
        gap: 8px;
    }

    .welcome-copy {
        padding-top: 34px;
    }

    .welcome-copy h1 {
        font-size: clamp(2.15rem, 10vw, 3rem);
    }

    .welcome-features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 26px 18px;
    }

    .question-panel {
        padding: 22px 18px;
    }

    .question-field {
        padding: 12px;
        align-items: stretch;
        flex-direction: column;
    }

    .section-heading {
        align-items: flex-end;
    }

    .section-heading h2 {
        font-size: 1.4rem;
    }



    .conversation-card {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 12px;
        padding: 14px;
        align-items: start;
    }

    .conversation-main {
        grid-column: 2;
    }

    .noticeboard-section .search-result-activity,
    .search-result-replies,
    .conversation-replies,
    .conversation-last {
        display: none !important;
    }

    .conversation-preview {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .noticeboard-section .search-result-topic {
        grid-column: 2;
        text-align: left;
    }

    .search-result-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        padding: 16px;
    }

    .search-result-topic {
        text-align: left;
    }
}

@media (max-width: 600px) {
    .tearoom-tables {
        grid-template-columns: 1fr;
    }
