.account-button,
.primary-action,
.secondary-action,
.community-tab,
.auth-switch button,
.form-submit,
.owner-actions button {
  font: inherit;
  cursor: pointer;
}

[hidden] { display: none !important; }

.account-button {
  padding: 10px 17px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 9px;
  background: transparent;
  color: #fff;
  font-size: .8rem;
}

.account-button.logged-in { color: var(--cyan); border-color: rgba(168,212,0,.45); }

.community-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0 95px;
  background:
    radial-gradient(circle at 12% 15%, rgba(244,233,0,.1), transparent 23rem),
    radial-gradient(circle at 78% 40%, rgba(168,212,0,.12), transparent 30rem),
    linear-gradient(135deg, #102019, #173326);
  color: #fff;
}

.community-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .045;
  background-image: linear-gradient(rgba(255,255,255,.4) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.4) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.community-hero-grid { display: grid; grid-template-columns: 1fr 330px; gap: 70px; align-items: center; position: relative; z-index: 1; }
.community-hero h1 { margin: 12px 0 19px; font-size: clamp(2.8rem, 6vw, 5.6rem); line-height: 1.13; letter-spacing: -.05em; }
.community-hero h1 span { color: var(--cyan); }
.community-hero p { max-width: 690px; margin: 0; color: #abc0b4; font-size: 1rem; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.primary-action,.secondary-action { border: 0; border-radius: 10px; padding: 12px 20px; font-weight: 700; }
.primary-action { background: var(--cyan); color: var(--ink); }
.secondary-action { background: rgba(255,255,255,.07); color: #fff; border: 1px solid rgba(255,255,255,.16); }

.community-orbit { width: 300px; height: 300px; position: relative; display: grid; place-items: center; border: 1px solid rgba(168,212,0,.2); border-radius: 50%; }
.community-orbit::before { content: ""; position: absolute; inset: 42px; border: 1px dashed rgba(255,255,255,.15); border-radius: 50%; }
.orbit-core { display: grid; place-items: center; width: 105px; height: 105px; border-radius: 30px; transform: rotate(8deg); background: linear-gradient(145deg,var(--cyan),#348e35); color: #102019; font-size: 1.8rem; font-weight: 800; box-shadow: 0 20px 60px rgba(0,0,0,.28); }
.community-orbit span { position: absolute; padding: 7px 13px; border-radius: 999px; background: #fff; color: var(--ink); font-size: .7rem; font-weight: 700; }
.community-orbit span:nth-of-type(1) { top: 19px; right: 34px; }
.community-orbit span:nth-of-type(2) { left: -8px; top: 142px; }
.community-orbit span:nth-of-type(3) { right: 45px; bottom: 8px; }

.community-shell { padding-top: 60px; padding-bottom: 110px; }
.community-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 35px; margin-bottom: 30px; }
.community-toolbar h2 { margin: 5px 0 0; font-size: clamp(1.7rem,4vw,3rem); color: var(--ink); }
.community-search { display: flex; align-items: center; gap: 9px; width: min(420px,100%); padding: 4px 15px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.community-search input { width: 100%; border: 0; outline: 0; padding: 10px 3px; background: transparent; }
.community-tabs { display: flex; gap: 7px; width: fit-content; margin-bottom: 28px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.community-tab { border: 0; border-radius: 8px; padding: 9px 16px; background: transparent; color: #63736b; font-size: .82rem; }
.community-tab.active { background: var(--ink); color: #fff; }

.content-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.community-card { display: flex; flex-direction: column; min-height: 310px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 4px 0 rgba(16,32,25,.02); transition: transform .2s ease, box-shadow .2s ease; }
.community-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.community-card-accent { height: 8px; background: linear-gradient(90deg,var(--cyan),var(--amber)); }
.community-card-body { display: flex; flex: 1; flex-direction: column; padding: 25px; }
.community-card .tag { width: fit-content; padding: 4px 9px; border-radius: 999px; background: #f1f8dc; }
.community-card h3 { margin: 12px 0 8px; color: var(--ink); font-size: 1.1rem; line-height: 1.55; }
.community-card p { margin: 0 0 18px; color: #65766d; font-size: .82rem; line-height: 1.9; }
.community-card-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 17px; border-top: 1px solid #edf1ed; color: #849189; font-size: .7rem; }
.community-card-button { display: block; width: 100%; border: 0; background: none; color: inherit; text-align: right; cursor: pointer; }
.community-card-cover { width: 100%; aspect-ratio: 16/8; object-fit: cover; display: block; background: #173326; }

.model-symbol { display: grid; place-items: center; height: 118px; background: linear-gradient(145deg,#102019,#244d38); color: var(--cyan); font-size: 2.3rem; font-weight: 800; }
.model-image { width: 100%; height: 150px; object-fit: cover; display: block; background: #173326; }
.model-license { color: #287529; font-weight: 700; }
.download-link { display: inline-flex; justify-content: center; margin-top: 15px; padding: 10px 14px; border-radius: 9px; background: var(--ink); color: #fff; font-size: .78rem; font-weight: 700; }
.models-note { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; padding: 16px 20px; border: 1px solid #d7e5ba; border-radius: 13px; background: #f3f9e4; color: #46594e; }
.models-note span { color: #387f30; font-size: 1.5rem; }
.models-note p { margin: 0; font-size: .8rem; }
.community-empty { display: grid; gap: 8px; justify-items: center; padding: 75px 20px; text-align: center; color: #728178; }
.community-empty strong { color: var(--ink); font-size: 1.2rem; }

.community-dialog { width: min(640px,calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; overflow: auto; border: 0; border-radius: 21px; background: #fff; color: var(--ink); box-shadow: 0 30px 100px rgba(0,0,0,.25); }
.community-dialog::backdrop { background: rgba(7,22,15,.72); backdrop-filter: blur(7px); }
.dialog-close-form { position: sticky; z-index: 3; top: 12px; height: 0; margin: 0; text-align: left; pointer-events: none; }
.dialog-close { width: 36px; height: 36px; margin-left: 12px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; pointer-events: auto; font-size: 1.4rem; line-height: 1; }
.dialog-copy { padding: 36px 38px 18px; }
.dialog-copy h2 { margin: 7px 0; font-size: 1.65rem; }
.dialog-copy p { margin: 0; color: #6e7d75; font-size: .82rem; }
.community-dialog > form:not(.dialog-close-form), .reader-dialog article { padding: 0 38px 38px; }
.community-dialog label { display: grid; gap: 7px; margin: 14px 0; color: #435249; font-size: .78rem; font-weight: 600; }
.community-dialog input:not([type=checkbox]),.community-dialog textarea,.community-dialog select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #fbfcfa; color: var(--ink); font: inherit; font-weight: 400; resize: vertical; }
.community-dialog input:focus,.community-dialog textarea:focus,.community-dialog select:focus { outline: 3px solid rgba(168,212,0,.22); border-color: #8ebf19; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-switch { display: flex; margin: 0 38px 18px; padding: 4px; border-radius: 10px; background: #f0f4ee; }
.auth-switch button { flex: 1; border: 0; border-radius: 7px; padding: 8px; background: transparent; }
.auth-switch .active { background: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.06); }
.form-submit { width: 100%; margin-top: 8px; border: 0; border-radius: 10px; padding: 12px; background: var(--cyan); color: var(--ink); font-weight: 800; }
.form-submit:disabled { opacity: .55; cursor: wait; }
.form-message { min-height: 22px; color: #b53232; font-size: .75rem; }
.form-message.success { color: #267329; }
.password-hint { color: #7a877f; font-size: .7rem; }
.file-drop { padding: 20px; border: 1px dashed #aabcae; border-radius: 12px; background: #f8faf6; text-align: center; cursor: pointer; }
.file-drop input { position: absolute; opacity: 0; pointer-events: none; }
.file-drop span { color: #557060; font-weight: 500; }
.rights-check { grid-template-columns: auto 1fr; align-items: start; }
.rights-check input { margin-top: 5px; }
.upload-progress { display: flex; align-items: center; gap: 10px; color: #53665b; font-size: .75rem; }
.upload-progress i { width: 16px; height: 16px; border: 2px solid #d5dfd4; border-top-color: #398a28; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

.reader-dialog { width: min(790px,calc(100% - 28px)); }
.reader-dialog article { padding-top: 42px; }
.reader-cover { width: 100%; max-height: 330px; object-fit: cover; border-radius: 14px; margin-bottom: 22px; }
.reader-dialog h2 { margin: 10px 0; font-size: clamp(1.8rem,5vw,3rem); line-height: 1.4; }
.reader-meta { padding-bottom: 20px; border-bottom: 1px solid var(--line); color: #738078; font-size: .75rem; }
.reader-body { padding: 20px 0 5px; color: #34473c; font-size: 1rem; line-height: 2.05; }
.reader-body p { margin: 0 0 20px; white-space: pre-wrap; }
.owner-actions { display: flex; gap: 9px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.owner-actions button { padding: 8px 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.owner-actions .danger { color: #a32e2e; }
.comments { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.comments h3 { margin: 0 0 14px; }
.comments form { display: flex; gap: 8px; align-items: end; }
.comments form textarea { flex: 1; min-height: 80px; border: 1px solid var(--line); border-radius: 9px; padding: 10px; font: inherit; resize: vertical; }
.comments form button { border: 0; border-radius: 8px; padding: 10px 14px; background: var(--ink); color: #fff; font: inherit; cursor: pointer; }
.comment { margin-top: 13px; padding: 14px; border-radius: 10px; background: #f6f9f4; }
.comment-head { display: flex; justify-content: space-between; color: #6b7a71; font-size: .68rem; }
.comment p { margin: 8px 0 0; white-space: pre-wrap; font-size: .82rem; }
.text-button { border: 0; padding: 4px 0; background: transparent; color: #4b7f3d; font: inherit; font-size: .72rem; text-align: right; cursor: pointer; }
.text-button.danger { width: 100%; margin-top: 12px; color: #a32e2e; text-align: center; }
.admin-link { display: block; margin-top: 12px; padding: 10px; border-radius: 9px; background: #eef6dc; color: #2c6829; text-align: center; text-decoration: none; font-size: .78rem; font-weight: 700; }
.viewer-dialog { width: min(920px,94vw); }
.viewer-dialog canvas { display: block; width: calc(100% - 76px); height: auto; max-height: 62vh; margin: 0 38px; background: radial-gradient(circle at 50% 35%,#263b30,#0d1913 72%); border-radius: 18px; border: 1px solid #375144; }
.rotation-control { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; margin: 1rem 38px 28px; }
.rotation-control input { accent-color: #8ebf19; }
.preview-button { border: 1px solid #8ebf19; background: transparent; color: #245a35; border-radius: 10px; padding: .65rem .85rem; font: inherit; font-weight: 800; cursor: pointer; }

@media(max-width:900px){.community-hero-grid{grid-template-columns:1fr}.community-orbit{display:none}.content-grid{grid-template-columns:1fr 1fr}.community-toolbar{align-items:stretch;flex-direction:column}.community-search{width:100%}}
@media(max-width:580px){.nav .brand>span:last-child{display:none}.account-button{padding:8px 11px}.community-hero{padding:58px 0 68px}.community-hero h1{font-size:2.5rem}.content-grid{grid-template-columns:1fr}.community-tabs{width:100%}.community-tab{flex:1;padding:9px 8px}.dialog-copy,.community-dialog>form:not(.dialog-close-form),.reader-dialog article{padding-right:22px;padding-left:22px}.auth-switch{margin-right:22px;margin-left:22px}.form-row{grid-template-columns:1fr}.viewer-dialog canvas{width:calc(100% - 36px);margin:0 18px}.rotation-control{margin-right:18px;margin-left:18px}}

